Cleaned up authentication code.
Fix for server message compression.