Remove unused variables and improve JSON decoding in saveEnclosureProgression()
This is a rebase of #1618 in which @dave-atx added WebAuthn support. Closes #1618