public bool TryAdminLogin(string userName, string password, out LoginToken <Administrator> token) { _administrator = new AdministratorDAOMSSQL(); Administrator administrator = _administrator.GetAdministratorByUserName(userName); if (administrator != null) { if (administrator.PASSWORD == password) { token = new LoginToken <Administrator>() { User = administrator }; return(true); } else { throw new WrongPasswordException("Wrong Password Exception"); } } token = null; return(false); }