defined a flash_messages jinja macro to avoid duplication