Added ability to connect to alternate URL

Also updated required versions of AngularJS and Socket.IO and refactored code.

I can leave this forked if you prefer not to merge this in.