Fix add user and refactor register
Merge pull request #361 from liuchuangww/user

Fix add user and refactor register