Moves auth logic into ApplicationRouter for cleaner routing