added flash messages to layouts