center successful and error modals on first open