Fix for auth url when API mode was enabled.