Add error and flash messages to application