Base64 encode application data, instead of escaping.  Fix typo in protocol.  Add debug statement to test code.
Don't use output_token after free