add hmac check for text messages
fix client output to stdout instead of stderr