fixed authkey error on private channel/require json/assert string on json decode

Fixed errors on HMAC auth for private channels.  Required json lib.
Checked that msg.data was string before decoding.