Use Python Decorator instead of manually checking authentication