Refactored passport login