add flash messages to actions