Moves auth functionality to its own directory