public ActionResult Index(SignUpViewModel viewModel) { if (!ModelState.IsValid || !viewModel.IsAgreementChecked) { return(View("Index", viewModel)); } _signUpService.CreateUser(viewModel); MySqlWebSecurity.Login(viewModel.UserName, viewModel.Password); return(RedirectToAction(NameHelper.Home.Index, NameHelper.Home.Controller)); }