public ActionResult Login(string returnUrl)
        {
            ViewBag.ReturnUrl = returnUrl;

            var model = new LoginModel();
            var captcha = GenerateCaptcha();
            model.CaptchaQuestion = captcha.Item1;
            model.GoodAnswer = captcha.Item2;

            return View(model);
        }
        public ActionResult Login(LoginModel model, string returnUrl)
        {
            if (ModelState.IsValid && WebSecurity.Login(model.UserName, model.Password, persistCookie: model.RememberMe))
            {
                return RedirectToLocal(returnUrl);
            }

            // If we got this far, something failed, redisplay form
            ModelState.AddModelError("", "The user name or password provided is incorrect.");

            var captcha = GenerateCaptcha();
            model.CaptchaQuestion = captcha.Item1;
            model.GoodAnswer = captcha.Item2;

            return View(model);
        }