completely fix the protocol, now works 100%. Also add a sample WIP chat client. Fixes most of the tests.