// Also added from GitHub, modified to NOT use async
        private void SignIn(Member user)
        {
            var identity = userManager.CreateIdentity(
                user, DefaultAuthenticationTypes.ApplicationCookie);

            GetAuthenticationManager().SignIn(identity);
        }
        public ActionResult Register(AuthRegisterViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return View();
            }

            var user = new Member
            {
                // the order of the following is how they will display
                //UserName = model.Email,
                NameFirst = model.NameFirst,
                NameLast = model.NameLast,
                Email = model.Email,
                UserName = model.UserName
                //Password = model.Password,
                //Gender = model.Gender

            };

            var result = userManager.Create(user, model.Password);

            if (result.Succeeded)
            {
                SignIn(user);
                return RedirectToAction("Index", "Home");
            }

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

            return View();
        }