refactored authentication specs