public IActionResult Login(User user) { bool value = _provider.CheckUser(user); if (value == true) { string token = _loginProvider.GetToken(); var t = token; if (t != "") { HttpContext.Session.Clear(); HttpContext.Session.SetString("uid", user.Name); HttpContext.Session.SetString("token", t); return(RedirectToAction("AuditType", "Home")); } } ViewBag.ErrorMessage = "• Invalid Username Or Password"; return(View()); }