user = new User();
user.setUsername(userName);
user.setFirstName(firstName);
user.setLastName(lastName);
user.setPassword(passwordServiceImpl.getMD5EncodedPasswordHash(password));
Authority authority = new Authority();
List<Authority> authorities = new ArrayList<Authority>();
user.setAuthorities(authorities);
try {
user = userRepository.saveAndFlush(user);