added pause in game and exit when lose connection