Implement first version of anonymous user creation.

Some tests still fail. This might be caused by duplicate
rows appearing in the DB.