Improve creation of user on shibboleth login and more tests

Just reorganized a bit the way it is done, but it still has the same results.