feature(authoring): detect leaving authoring screen with unsaved changes

now it will listen to event and ask for confirmation before leaving.

SD-443