Added sorted-map to query parameters; updated auth key handling