IPersonService service = SimalRepositoryFactory.getPersonService();
IPerson user = service.findByUsername(usernameRequested);
if (user == null) {
String id = SimalRepositoryFactory.getPersonService().getNewID();
String uri = RDFUtils.getDefaultPersonURI(id);
IPerson person = service.create(uri);
person.setUsername(usernameRequested);
person.setPassword(passwordRequested);
SimalSession.get().authenticate(usernameRequested, passwordRequested);
} else {