// USER RELATED METHODS public static UserAccount AuthenticateUser(string userName, string password) { /// Accepts login input and sets the appropriate UserAccount object and permissions token BusinessObjects _businessObjects = new BusinessObjects(); UserAccount userAccount = _businessObjects.GetUserAccountByUserName(userName); if (userAccount == null) { userAccount = new UserAccount("invalid", "invalid", true); } if (!userAccount.MatchPassword(password)) { userAccount.ClearPermissionSet(); } return(userAccount); }