Refactors the login router to loginRouter.js