private ActionResult LoginUserStart(LoginStartViewModel model, string returnUrl)
 {
     var loginStepResult = LoginUserWithMailAndPassword(model);
     SetTempData(loginStepResult);
     SetStepCookie(loginStepResult.SecurityToken);
     return RedirectToAction("LoginFinish", "Account", new { returnUrl = returnUrl });
 }
        public ActionResult LoginStart(LoginStartViewModel model, string returnUrl)
        {
            if (ModelState.IsValid)
            {
                return TryLoginUserStart(model, returnUrl);
            }

            return View(model);
        }
        private ActionResult TryLoginUserStart(LoginStartViewModel model, string returnUrl)
        {
            try
            {
                return LoginUserStart(model, returnUrl);
            }
            catch (InvalidUserOrPasswordException ex)
            {
                AddModelStateError(GlobalStrings.UserNameOrPasswordIsInvalid);
            }
            catch (Exception)
            {
                AddModelStateError(GlobalStrings.SomethingWentWrong);
            }

            return View(model);
        }
 private SecurePhraseQuestion LoginUserWithMailAndPassword(LoginStartViewModel model)
 {
     return this.Authentication.Login(model.Email, model.Password);
 }
 public ActionResult LoginStart(string returnUrl)
 {
     ViewBag.ReturnUrl = returnUrl;
     var model = new LoginStartViewModel();
     return View(model);
 }