Added password message and slightly more robust error reading.
Added plain and md5 auth.