finished chapter 7. user model and authentication mechanism.