User: Handle querying by username for a non-existent user

Fixes user generation and install script.
Auth: Only store user id in the session

We need to create a user instance on every request anyway, so we might as well
reduce the amount of data being stored in the session.