CLC-1184 Test nonexistent users, add some logging

JIRA: https://jira.media.berkeley.edu/jira/browse/CLC-1184

The bug reported in the JIRA was already fixed by some refactoring I did, but I took the investigation as an opportunity to strengthen the unit tests and add some logging.