Add extra error checking and logging to Software Secure callback

About half the messages we're getting back are still broken (either malformed JSON or a string instead of a dict). Adding code to put those in our logs and return nice 400s instead of 500 explosions. @dianakhuang