Hmm, I think this might crash if a user who isn't logged in updates a related item (if CKAN's auth was configured to allow that, which I think it could be). See example `follow_dataset()` in `create.py` for a safer way to do this. Really the auth check (which is a few lines below this one) should be done first before doing anything else