public ActionResult LoginBackDoor(LoginViewModel loginFormModel, string returnUrl) { if (ModelState.IsValid && _accountLogic.CreateDefaultConfiguration(loginFormModel)) { FormsAuthentication.SetAuthCookie(loginFormModel.Username, false); Session[Constants.RoleBasedMenu.ToStringValue()] = null; return(RedirectToLocal(returnUrl)); } // If we got this far, something failed, redisplay form ModelState.AddModelError("Username", "Hey you...! We got you :P"); return(View("Login", loginFormModel)); }