Fixed closing of player connection and unregistering at server.