public ActionResult Index(User user) { var dbUser = _userBll.AuthenticateAndGetUserIfOk(user.Username, user.Password); if (dbUser != null) { authenticateUser(dbUser); return(RedirectToAction("Index", "Admin")); } else { deauthenticateUser(); return(View()); } }