authentication routes refactored