public async Task<IHttpActionResult> Register(RegisterBindingModel model)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            var user = new ApplicationUser() { UserName = model.UserName, Email = model.Email };

            IdentityResult result = await UserManager.CreateAsync(user, model.Password);

            if (!result.Succeeded)
            {
                return GetErrorResult(result);
            }
            return Ok();
        }
        public async Task<IHttpActionResult> ResetPassord(RegisterBindingModel model)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            var user = await UserManager.FindByEmailAsync(model.Email);

            if (user == null)
            {
                return GetErrorResult(new IdentityResult("User with email " + model.Email + " was not found."));
            }

            if (!user.UserName.Equals(model.UserName))
            {
                return GetErrorResult(new IdentityResult("The user name registered with the email " + model.Email + " does not match."));
            }

            IdentityResult result = await UserManager.RemovePasswordAsync(user.Id);

            if (!result.Succeeded)
            {
                return GetErrorResult(result);
            }

            result = await UserManager.AddPasswordAsync(user.Id, model.Password);

            if (!result.Succeeded)
            {
                return GetErrorResult(result);
            }


            return Ok();
        }