Fix history hack; Fix clientid/secret; fix json