Added some logging to lookupUser and removed unneccessary loop