MAIN-16 adding option for closing modal, and logic so modal can be opene...

...d again