get the page flow working correctly with routes