public PortalUser AuthenticateUser(string email, Password password) { PortalUser user; try { user = userRepository.LoadUser(email); } catch (Exception) { throw new UserNotAuthorizedException(); } if (!password.Equals(user.Password)) throw new UserNotAuthorizedException(); return user; }