Small improvements; log connection errors, correct plaintext protocol.