public bool Login(string email, string password) { // This function should only be called after we verified the password and email length! if (!CheckPasswordLength(password)) { Exception e = new Exception("Password Error"); e.Data.Add("stringInfo", string.Format("Password Length must be longer than {0} and shorter than {1}!", Constants.MIN_PASSWORD_LENGTH, Constants.MAX_PASSWORD_LENGTH)); throw e; } else if (!CheckEmailLength(email)) { Exception e = new Exception("Email Error"); e.Data.Add("stringInfo", string.Format("Email Length must be shorter than {0}!", Constants.MAX_EMAIL_LENGTH)); throw e; } return(DBF.Login(email, password)); }