added flash messages and styling