more api tests, add another user and another host so we can test separation
avoid KeyErrors in logging, at least for default log format

remove ineffective defaultdict