fix session when registering