added event handlers for window beforeunload event. used to release any reserved tickets and delete order in backend. tidying up. also added another custom router:set_current_view with the aim to avoid zombie views. not yet complete. also, safari with url navigation away does NOT trigger beforeunload event and cleanup. TODO.