public ActionResult Login(string email, string password) { var user = UserService.GetUser(email); if(user== null) { user = new User(); } else { Session["UserName"] = user.Email; FormsAuthentication.SetAuthCookie(user.Email, false); return RedirectToAction("Index", "Home"); } return View(user); }
public ActionResult Login() { var userModel = new User(); return View(userModel); }