Merge pull request #1 from paul-lshift/logging-fixes

Logging fixes
Send commands as JSON not forms.