Store active tab in session to always open the last one used

PR for #494
Stores the last recently used tab on session so you always get that one if you don't especify one (via url).
This removes the feature of changing the default app via hidden pref but instead uses the app with the highest priority in the navigation bar as the default one.

This does not work after logout, not sure how I should persist user related information if not in session.