more users log logic with pagination
update sql and minor log changes