Write user id to session rather than serialized object

This lets a Doctrine entity of the user work. If we serialize the object, it doesn't get its associations initialized properly.