Refactored PinAuth