So user could be:
* a dictionary (from the credentials file)
* a mock user
* None (create a user just for login purposes)

Fortunately the dictionary and mock user can both be accessed in the same way as the mock user is essential just a dictionary.