Moved modification of URL to get_token method.