[BUGFIX] Avoid logout when changing the encryption key