use PocketIO for websockets

The preloading of the latest frame on page load was lost in this commit.
But at least the app actually works now. :)

It could use some cleaning up as well. I could probably utilize
socket.io rooms if I shift some bits around.