added sync session destroy on window unload to destroy session when user reloaded page