Socket sends disconnect event on page close