Merge pull request #689 from dreid/twofactor-cleanup

Cleanup twofactor docs and code.