private static void blowUpIfEmployeeCannotLogin(User user)
 {
     if (user == null)
     {
         throw new InvalidCredentialException(
             "That user doesn't exist or is not valid.");
     }
 }
 public void LogIn(User user)
 {
     blowUpIfEmployeeCannotLogin(user);
     FormsAuthentication.RedirectFromLoginPage(user.Username, false);
 }
 public bool PasswordMatches(User user, string password)
 {
     string passwordHash = _cryptographer.GetPasswordHash(password, user.PasswordSalt);
     return passwordHash.Equals(user.PasswordHash);
 }