Serialize current user object for loading later. The default implementation handles the serialization of id and username.