add flash[:error] to layout