websocket url parsing made. In original version, device always tries to connect
to websocket at http://targetdomain/device,
After fix it connects to http://targetdomain/targeturl/device