Adding ability to register a user.

Signed-off-by: Ben Corlett <bencorlett@me.com>
More tweaks throughout the code.

Signed-off-by: Ben Corlett <bencorlett@me.com>