Issue 384 passcodes per user

Fixes #384 - see the issue for description of the scheme.