public async Task <User> Register(User user, string password)
        {
            byte[] passwordHash, passwordSalt;
            PasswordChecker.CreatePasswordHash(password, out passwordHash, out passwordSalt);

            user.PasswordHash = passwordHash;
            user.PasswordSalt = passwordSalt;

            var roles = await _roleRepository.GetAll();

            var role = roles.Where(i => i.Name == "REGISTERED_USER").FirstOrDefault();
            var id   = await _userRepository.Add(user);

            var endUser = await _userRepository.GetById(id.ToString());

            await _userRoleRepository.Add(new UserRole()
            {
                UserId = id,
                RoleId = role.Id
            });

            return(endUser);
        }