Added work-around for JSON data being received via realtime.js and not already in JSON format.
Added support for debug data to be logged in browser in Realtime.