fix #104 Handle "WebSocket is closed before the connection is established.", fix UI issue in Firefox, fix typo, cleanups, remove unnecessary log messages