How to provide option to close a page after time delay or press of button

I am trying to set up a page called from the main page which closes, and returns to the main page, either automatically after a period of time (say 15 seconds), or immediately on the press of a button.

I have a button set up on the secondary page with a link back to the main page so that pressing that button takes me back to the main. That part works.

For the returning automatically after a period of time, I tried to set up a delay and a link back to the main page in the entrance. This does work... however while the delay is running in the entrance, pressing the other button doesn't work.

At this stage, I don't want to set up a drawer. Does anyone have any ideas on how to accomplish this with distinct pages?

That works well, however because I have lot happening on that entrance I chose to set the entrance to run every 5 seconds and I set the counter to 5 second increments. This way when I set the IF to $counter$>= 30 it means that the page stays open for about 25 seconds unless closed with the button press.