private static SessionUser LoginPrivate(string username, string password, out string message) { UserBl userBl = new UserBl(); User user = userBl.Login(username, password); if (user != null) { message = null; return(LoginPrivate(user)); } else { message = "ItCode or Password is invalid!"; return(null); } }