onDisconnect handler for the server + some cleanup