That is because function that logs that activity is called at the moment does not have information about the user. Try changing the hook that is called to another that contains that info, like “clear_auth_cookie”. Of course if you are familiar with how wordpress is functioning. Hope this helps.