Add support for extracting token from query string