public function loginAs($userId, $guard = null)
    {
        $userId = method_exists($userId, 'getKey') ? $userId->getKey() : $userId;

        return $this->visit(rtrim('/_dusk/login/'.$userId.'/'.$guard, '/'));
    }