update UI with error and flash messages and buttons