Fix issue with web socket negotiation
Use programic web socket client in tests
Also deal with empty sub protocol