Changed Socket.io endpoint to dynamic detection in remote.html
Added dynamic detection of host server for the index.html page