fix websocket address bug

localhost was hardcoded in; now respects arbitrary hostnames/ports