Fix the detection of the oauth2 page in the template