-Added a disconnected event for when the page is closed or navigated away from.