added flash messages and home link to layout