fixed illegal user registration bug