Fix for token not being properly extracted from the URL