added refresh of page when user clicks outside of modal to close it