enhanced auth functionality