added close btn to modal and control hide/show on error