Connect sockets to _localhost_ using window.location.origin