Implemented user registration partially

No crypto done yet for pass/salt.
There is also a small refactor of overlapping err variable names.