public async Task <IActionResult> Register(Register user)
        {
            if (ModelState.IsValid)
            {
                var users = new ApplicationUser {
                    UserName = user.Email, Email = user.Email
                };
                var result = await _accountServices.CreateUserAsync(user);

                if (result.Succeeded)
                {
                    if (_signInManager.IsSignedIn(User) && User.IsInRole("Admin"))
                    {
                        return(RedirectToAction("ListUsers", "Administration"));
                    }
                    await _signInManager.SignInAsync(users, isPersistent : false);

                    return(RedirectToAction("Index", "Home"));
                }

                foreach (var error in result.Errors)
                {
                    ModelState.AddModelError("", error.Description);
                }
            }
            return(View(user));
        }