New user creation: Done.

Completed the implementation of new user creation within the system.
Extra checks built into step 3 to check that the user doesn't already
exist, as resubmitting via the browser sometimes defeated this check in
testing.
Password hashing refactor

Refactored the password hashing function into a seperate library -
better seperation since it is now used in more than one place.