connect to location.hostname, not localhost