public ActionResult LogOn(string userName, string password, bool rememberMe, string returnUrl)
        {
            if (!ValidateLogOn(userName, password))
            {
                ViewData["rememberMe"] = rememberMe;
                return(View());
            }

            var canonicalUsername = membershipReadModel.GetCanonicalUsername(userName);
            var userId            = membershipReadModel.GetUserIdByUserName(userName);

            AddAuthenticationTicketToCookie(userId, userName, rememberMe, canonicalUsername);

            if (!string.IsNullOrEmpty(returnUrl))
            {
                return(Redirect(returnUrl));
            }

            return(RedirectToAction("Index", "Home"));
        }