Fix add user and refactor register