add json to test responses, clean up client and fix auth for that api (bug 868028)