Added logic to Leave Game Button to handle more cases