Connecting to Remote Servers and JavaScript Security