//
 // GET: /Manage/ManageLogins
 public async Task<ActionResult> ManageLogins(ManageMessageId? message)
 {
     ViewBag.StatusMessage =
         message == ManageMessageId.RemoveLoginSuccess ? Properties.Resources.Manage_Status_RemoveLoginSuccess
         : message == ManageMessageId.Error ? Properties.Resources.Manage_Status_Error
         : "";
     var user = await UserManager.FindByIdAsync(UserId);
     if (user == null)
     {
         return ErrorView();
     }
     var userLogins = await UserManager.GetLoginsAsync(UserId);
     var otherLogins = AuthenticationManager.GetExternalAuthenticationTypes()
         .Where(auth => userLogins.All(ul => auth.AuthenticationType != ul.LoginProvider))
         .ToList();
     ViewBag.ShowRemoveButton = user.PasswordHash != null || userLogins.Count > 1;
     var model = new ManageLoginsViewModel
     {
         CurrentLogins = userLogins,
         OtherLogins = otherLogins,
         ExternalAuthenticationTypes = AuthenticationManager.GetAuthenticationTypes()
     };
     return ManageLoginsView(model);
 }
 private ActionResult ManageLoginsView(ManageLoginsViewModel model)
 {
     return View( ViewNames. ManageLogins, model);
 }