check duplicate user_id, public key