Support for YubiKey

This PR adds support for two-factor authentication with YubiKeys. The PR is work-in-progress, and not yet ready for merge. It is listed as a PR to get code reviews / extra eyes early on.