close socket connection when logout is clicked. Reconnect when logging back in