Implemented authentication for all json service requests.