Added router to control page navigation.