Adds websocket to global scope.