Added security hack on window.unload, which also closes sockets that are still in connection state.
Fixed context binding for reconnect interval.
Removed unused console.log