public static void AuthenticatePatient(string username, string password) { AuthenticationService authenticationService = null; if (HttpContext.Current != null && HttpContext.Current.Session["LoggedPatient"] == null) { HttpContext.Current.Session["LoggedPatient"] = new AuthenticationService(); } authenticationService = (AuthenticationService)HttpContext.Current.Session["LoggedPatient"]; authenticationService.AuthenticatePatient(username, password); }