Make pyjwt module conditional at runtime.
Description
Instead of setting a global bool, use sys.modules
for a deterministic check.
Was observing weird behavior, believe it was due to the global bool being cached when the project was built, leading to non-deterministic behavior when trying to change the authentication configuration.