trying to close browser on connection loss