public ActionResult LogOn(LogOnModel model, FormCollection col)
        {
            if (ModelState.IsValid)
            {
                string returnUrl = model.ReturnUrl;

                if (ValidateUserPassword(model.Login, model.Password))
                {
                    User user = GetUserByLogin(model.Login);

                    SetSaveCurrentCulture(user.Culture);
                    if (user.IfNotNull(u => u.AlterPassword) == true)
                    {
                        return RedirectToAction("LogonChangePassword", model);
                    }
                    else
                    {
                        AuthorizeUser(user, model.RememberMe);
                        return RedirectReturn(returnUrl);
                    }
                }
                else
                {
                    ModelState.AddModelError("",
                        SystemExtensions.Sentence(model.GetDisplayName(m => m.Login), LocalStr.or, model.GetDisplayName(m => m.Password), LocalStr.verbIsNot, LocalStr.valid)
                    );
                }
            }

            // If we got this far, something failed, redisplay form
            return View(model);
        }
        protected ActionResult PostLogOnAction(LogOnModel model, string redirectPasswordAction, string defaultAction="Index", string defualtController="Home")
        {
            if (ModelState.IsValid)
            {
                string returnUrl = model.ReturnUrl;

                if (ValidateUserPassword(model.LoginUpper, model.Password))
                {
                    User user = GetUserByLogin(model.LoginUpper);

                    //SetSaveCurrentCulture(user.Culture);
                    if (user.IfNotNull(u => u.AlterPassword) == true)
                    {
                        return RedirectToAction(redirectPasswordAction, model);
                    }
                    else
                    {
                        AuthorizeUser(user, model.RememberMe);
                        return this.RedirectReturn(returnUrl, defaultAction, defualtController);
                    }
                }
                else
                {
                    ModelState.AddModelError("",
                        SystemExtensions.Sentence(model.GetDisplayName(m => m.LoginUpper), LocalStr.or, model.GetDisplayName(m => m.Password), LocalStr.verbIsNot, LocalStr.valid)
                    );
                }
            }
            // If we got this far, something failed, redisplay form
            return View(model);
        }