disconnecting socket on browser/tab close