Improved new device authorization (issue #2693)