Fix get_current_user from CLI

Ensure we don't crash if no logged in user, e.g. when called from CLI or
user not logged in.

Change-Id: I03884f979efd040a1cbcceb2906112ffb585ea7a