websocket: fix cert check. read response body on failures. add tests