Made toolbar security segment more reliable. Altered behaviour of app.user global variable to be more useful.