QOFFEE-143 Trying to correctly unregister when auth is required (workaround, it could fail in some situations)