Fixed incorrect existing user id check

Condition was always false causing a new id to be created for the same user.