implemented a user's session and reconnection