Restructured GUI / auth callback handling