public async Task <ActionResult> Register(RegisterAccountViewModel model)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    var result = await bookstoreService.RegiserNewAccount(model.Email, model.Password);

                    if (string.IsNullOrEmpty(result))
                    {
                        ModelState.AddModelError("", "Something went wrong!");
                        return(View(model));
                    }
                    else if (result.StartsWith("ERROR"))
                    {
                        ModelState.AddModelError("", result);
                        return(View(model));
                    }
                    else
                    {
                        ViewBag.Message = result;
                        ViewBag.IsError = false;
                        return(RedirectToAction("Login"));
                    }
                }
                return(View(model));
            }
            catch
            {
                return(View(model));
            }
        }
 public async Task <string> Register(string email, string password)
 {
     return(await bookstoreService.RegiserNewAccount(email, password));
 }