add user module and refactor