Fixed user registration bug