Added function to register a user. Untested, but hey, it compiles