public ActionResult Loggin(string Name, string Password) { GeneralUser user = new GeneralUser(); user.Authenticate(); LoggedinPersonsCache.Current.AddNewPerson(user); Response.Cookies.Add(FormsAuthentication.GetAuthCookie(user.Token.ToString(), false)); return RedirectToAction("Index", "TestAuthorized"); }