Refactors for new authentication routes