the client now Dynamicly gets the server URL and port from window.location elminating the need for hard coding the server url in the client