User model bug fixes
Merge pull request #180 from taiwen/user

User model bug fixes