Bugfix: crash when getting user from database for session if user does not exist.