Added option to ask before leaving the page