protected function redirectAfterSuccessfulLogin()
    {
        // Check password expiry
        if (Security::getCurrentUser()->isPasswordExpired()) {
            // Redirect the user to the external password change form if necessary
            return $this->redirectToChangePassword();
        }

        // Link to success template
        $url = CMSSecurity::singleton()->Link('success');
        return $this->redirect($url);
    }