How to handle is_user_logged_in() with w3 total cache [closed]

This is a feature. You can try to disable caching for logged in users, but if it is in the main nav this still won’t help as according to the settings screen:

Don’t cache pages for logged in users

Unauthenticated users may view a
cached version of the last authenticated user’s view of a given page.
Disabling this option is not recommended.

There are also some other questions for that issue that might clear this up further:

Showing as logged in after logout (W3 Total Cache issue)

https://stackoverflow.com/questions/19441226/w3-total-cache-still-cached-when-user-logging-by-nicety-login