added on startup code, fixed bug with logout, moved dialogs a bit