public ActionResult ResetPassword(ResetPasswordModel model)
        {
            if (ModelState.IsValid)
            {
                // Look up the user

                UserProfile user = _serviceLayer.GetUserProfile(_security.GetUserId(model.Email));

                if (user != null)
                {
                    // ResetPassword may throw an exception rather than return false in certain failure scenarios.
                    bool resetPasswordSucceeded;
                    try
                    {
                        resetPasswordSucceeded = _security.ResetPassword(model.PasswordResetToken, model.NewPassword);
                    }
                    catch (Exception)
                    {
                        resetPasswordSucceeded = false;
                    }

                    if (resetPasswordSucceeded)
                    {
                        return View("ResetPasswordSuccess");
                    }
                    else
                    {
                        ModelState.AddModelError("", "An error has occured. Please try again or contact the administrator.");
                    }
                }
                else
                {
                    ModelState.AddModelError("Email", "Unknown email address.");
                }
            }

            // If we got this far, something failed, redisplay form
            return View(model);
        }
        public ActionResult ResetPassword(string User, string Token)
        {
            ResetPasswordModel rpm = new ResetPasswordModel();
            rpm.Email = User;
            rpm.PasswordResetToken = Token;

            return View(rpm);
        }