Refines auth_required decorator.