public async Task <IActionResult> Register(RegisterModel registerModel)
        {
            ViewBag.IsSuccess = false;
            if (ModelState.IsValid)
            {
                var result = await _authenticateRepository.createUserAsync(registerModel);

                if (!result.Succeeded)
                {
                    foreach (var errorMessage in result.Errors)
                    {
                        ModelState.AddModelError("", errorMessage.Description);
                    }
                    return(View(registerModel));
                }
                ModelState.Clear();
                return(RedirectToAction(nameof(login), new { isSuccess = true }));
            }
            return(View());
        }