mpulled sockjs stuff outside client.html so that it can be used in tests