updated autheticateWithJson to use JSON. Also updated test to serialize using GSON so that null fields were not serialized by default.