Refactor authentication spec using shared example