fix #7993: close views when switching user and reopen them when user is authenticated