public async Task<IdentityResult> RegisterUser(RegistrationModel model)
        {
            var propertyManagerUser = new PropertyManagerUser
            {
                UserName = model.Username,
                Email = model.EmailAddress
            };

            var result = await _userManager.CreateAsync(propertyManagerUser, model.Password);

            return result;
        }
        public async Task<IHttpActionResult> Register(RegistrationModel registration)
        {
            // 1. Server side validation
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            // 2. Pass the registration to AuthRepository
            var result = await _repo.RegisterUser(registration);

            // 3. Check to see that registration was successful
            if (result.Succeeded)
            {
                return Ok();
            }
            else
            {
                return BadRequest("Registration form was invalid");
            }
        }