Slightly beter handling of TOTP challenge code.

This would previously give errors if the user entered a non-numeric TOTP code.