Are you using a plugin to show the login/logout widget?
If so, you may want to ask that developer what the easiest way to do this would be – they may have a better answer than me.
Off the top of my head, you could use a plugin like this: https://wordpress.org/plugins/display-widgets/
Then you could have two widgets, one showing for logged in users, and one showing for logged out users.
Hope this helps 🙂