data libraries: router improvements, detecting whether the loaded page is the first page of the app (user came from outside) or within and navigating accordingly