Add flash messages to appropriate pages