public User Login(string email, string password) { var user = GetByEmail(email); if (user == null) { return(null); } bool isCorrectPassword = PasswordEncryption.PasswordMatch(password, user.Password); if (isCorrectPassword) { return(user); } return(null); }