Added register code and User class
Merge branch 'master' into timothy