added better error handling: when socket.io is disconnected, page is reloaded