public SLPUser AuthenticateSLP(string username, string password) { SLPUser slpUser = null; password = HashSHA256(password); try { if (1 == _userAccess.VerifyUsernamePasswordSLP(username, password)) { slpUser = _userAccess.GetSLPByEmail(username); if (password == HashSHA256("newuser")) { slpUser.SLPUsers.Add("New User"); } } else { throw new ApplicationException("The SLP you requested was not found."); } } catch (Exception ex) { throw new ApplicationException("User not validated.", ex); } return(slpUser); }