client.js: connect to current hostname