Changed host to hostname to avoid illegal url if a port is used

window.location.host contains port number localhost:9001
window.location.hostname is without port number

Sync Listeners creates a websocket url using the "host" variable. Therefore the "host" variable cannot contain a port number.