public ActionResult Edit(string id)
 {
     var identity = UserManager.FindById(id);
     if (identity == null) return RedirectToAction("Index");
     var model = new EditLoginViewModel
     {
         UserName=identity.Email
     };
     return View(model);
 }
 public ActionResult Edit(EditLoginViewModel model)
 {
     if (ModelState.IsValid)
     {
         var identity = UserManager.FindByName(model.UserName);
         if (identity == null) return View(model);
         string resetToken = UserManager.GeneratePasswordResetToken(identity.Id);
         UserManager.ResetPassword(identity.Id, resetToken, model.NewPassword);
         identity.UserName = model.UserName;
         UserManager.Update(identity);
         return RedirectToAction("Index");
     }
     return View(model);
 }