public ActionResult AuthenticateUser(AuthenticationViewModel authViewModel) { try { SessionInfo session = _authMan.AuthernticateLogin(authViewModel.Session); if (session.User_Name == authViewModel.Session.User_Name) { SetUsersSession(session); return(RedirectToAction("Index", "Dashboard")); } else { TempData["FriendlyMessage"] = MessageStore.Get("SYS03"); return(RedirectToAction("Index", "Home")); } } catch (Exception ex) { Logger.Error("Authentication : " + ex.Message); HttpContext.Session.Clear(); TempData["FriendlyMessage"] = MessageStore.Get("SYS01"); return(RedirectToAction("Index", "Home")); } }