public ActionResult Login() { UserInfoRepository repo = new UserInfoRepository(); int id = int.Parse(requestWrapper.Form("Id")); string password = requestWrapper.Form("Password"); if (repo.Login(id, password)) { sessionWrapper.Set(ME, repo.Get(id)); Session.Timeout = 60; return(RedirectToAction("Menu", "Home")); } return(RedirectToAction("Index", "Home", new { ErrorMessage = "Invalid credentials. Try to login again or contact the site administrator." })); }