minor fixes plus working ssl and websocket masking