public ActionResult Index()
        {
            MembershipUser passwordChangedUser = null;
            var model = new AdminModel();
            foreach (MembershipUser user in Membership.GetAllUsers())
            {
                var roles = Roles.GetRolesForUser(user.UserName);

                model.UserModels.Add(new UserModel
                {
                    UserName = user.UserName,
                    Roles = roles.ToList()
                });
            }

            var reports = _repository.GetReports();
            foreach (var report in reports)
            {
                var latestStats = report.Latest.Statistics;
                
                if (latestStats.IsEmpty == false)
                {                   
                    model.ReportModel.Add(new ReportViewModel
                    {
                        Name = report.Id
                    });                   
                }
            }
            
            if (passwordChangedUser != null)
            {
                model.NewPassword = passwordChangedUser.GetPassword();
            }
            return View(model);
        }
        public ActionResult Index(AdminModel model)
        {
          
            if (ModelState.IsValid)
            {
                // Attempt to register the user
                MembershipCreateStatus createStatus;
                Membership.CreateUser(model.RegisterModel.UserName, model.RegisterModel.Password, model.RegisterModel.Email, null, null, true, null, out createStatus);

                if (createStatus == MembershipCreateStatus.Success)
                {
                    FormsAuthentication.SetAuthCookie(model.RegisterModel.UserName, false /* createPersistentCookie */);
                    return RedirectToAction("Index", "Home");
                }
                else
                {
                    ModelState.AddModelError("", ErrorCodeToString(createStatus));
                }
            }

            // If we got this far, something failed, redisplay form
            return View(model);
        }