Update main.js to autofocus on input and allow modal to be dismissed