Initialization of "host" variable needs to happen before websocket.js uses it.