moving token to query header in JSON protocol
fixing code review comments in protob server