public ActionResult LogOn(AccountModel model)
        {
            FormsAuthentication.SetAuthCookie(model.Name, false);
            if (isAdmin(model.Name, model.Password))
                return RedirectToAction("AdminPage");

            if (isValid(model.Name, model.Password))
                return RedirectToAction("Index", "Home");

            return View();
        }
 public ActionResult LogOff(AccountModel model)
 {
     return RedirectToAction("Index", "Home");
 }