/// <summary> /// Logs the in. /// </summary> /// <returns>ActionResult.</returns> public ActionResult LogIn(string returnUrl) { if (ProjectSession.UserID > 0) { return(RedirectToAction(Actions.Individual, Pages.Controllers.Master)); } LoginModel loginModel = new LoginModel(); if (Request.Cookies["TradingLicenseIsRemember"] != null && Request.Cookies["TradingLicenseIsRemember"] != null) { loginModel.RememberMe = ConvertTo.Boolean(Request.Cookies["TradingLicenseIsRemember"].Value); if (loginModel.RememberMe) { if (Request.Cookies["TradingLicenseUserName"] != null) { loginModel.Username = Request.Cookies["TradingLicenseUserName"].Value; } if (Request.Cookies["TradingLicensePassword"] != null) { loginModel.Password = EncryptionDecryption.GetDecrypt(Request.Cookies["TradingLicensePassword"].Value); } } } if (TempData["openPopup"] != null) { ViewBag.openPopup = TempData["openPopup"]; } loginModel.ReturnUrl = returnUrl; return(View(loginModel)); }