Add close functionality to Popup panel