Refactors login path to be protected more simply