public ActionResult Login(AccountLoginViewModel model)
 {
     if (!ModelState.IsValid)
     {
         return View(model);
     }
     var service = Ioc.GetService<IUserService>();
     if (service.CanLogin(model.Username, model.Password))
     {
         FormsAuthentication.SetAuthCookie(model.Username, model.RememberMe);
         return Redirect("/");
     }
     model.Error = "invalid username/password.";
     return View(model);
 }
 public ActionResult Login()
 {
     var model = new AccountLoginViewModel();
     return View(model);
 }