Set up sockjs with express
Refactors and fixes encoding issue with sockjs