Added missing logic in getExistingUser.