Changed ajax logic for user creation