fix #11, add an alert when users leave the page