Revert "Refactor auth checks"

This reverts commit 747cb14e1f967fb2a31ec6f92878ed87e6f0d939.
PEP8 update