Refactored Authentication Code Parse