// set the user as un-locked by default
user.setLocked(false);
// set the role as user by default
user.addAuthority(dao.load(new NameKey<Authority>(Authority.class, AuthorityRoles.ROLE_USER.toString(),
Authority.FIELDNAME_AUTHORITY)));
persist(user);
return user;