public function login (Request $request, User $user, $registration = false)
    {
        // Check for email validation
        if ($this->requiresEmailValidation()) {
            if (!$user->isEmailVerified()) {
                $request->getSession()->set ('catlab-non-verified-user-id', $user->getId());
                return Response::redirect(URLBuilder::getURL($this->routepath . '/notverified'));
            }
        }

        $request->getSession()->set('catlab-user-id', $user->getId());
        return $this->postLogin($request, $user, $registration);
    }