avoid using API when user is already in the database