First working version with separate web socket conneciton