added DOM beforeunload to FE