Added upsert of users in database and started implementation of ga query builder