public ActionResult Register(AuthenticationParamsViewModel auth)
 {
     if (!ModelState.IsValid)
     {
         return(View(auth));
     }
     using (var client = new AuthenticationServiceClient())
     {
         if (!client.RegisterUser(auth.User, auth.Password))
         {
             throw new Exception($"Ошибка при регистрации пользователя {auth.User}.");
         }
     }
     FormsAuthentication.SetAuthCookie(auth.User, true);
     return(RedirectToAction("Catalog", "Home"));
 }