check user before insert in db