Refactor admin auth check to object

For future maintainability