Better unmount handling and dirty hack for not unregistering firebase refs