Reduced code duplicity for right manager sidebar and dialog. Externalized common functions.

User dialog is now also available from the sidebar.