added comments to crypto fns.
Moved acc registration logic into it's own fn

Took the hardcoded params out of registerAccount() and into main entry
point auth(), nicer separation for registerAccount().