better main layout with header and footer sample and flash messages display