Updated main.js

Close the modal on close click