js derived websocket url
Merge pull request #332 from nikhan/fix#323

fix for #323