protected function authenticated(Request $request, $user)
{
/**
* Check to see if the users account is confirmed and active
*/
if (!$user->isConfirmed()) {
access()->logout();
throw new GeneralException(trans('exceptions.frontend.auth.confirmation.resend', ['user_id' => $user->id]));
} elseif (!$user->isActive()) {
access()->logout();
throw new GeneralException(trans('exceptions.frontend.auth.deactivated'));
}
event(new UserLoggedIn($user));
return redirect()->intended($this->redirectPath());
}