[Fixes #4] add user model
[Fixes #7] add register function