Added code for handling the case when user has disconnected for too long.