Want to show a link to log out only if a user is logged in and vice versa?
Try the below code, paste it directly into your template on WordPress.
<?php if (is_user_logged_in()){ echo '<a href="'.get_bloginfo('url').'/my-account/customer-logout/">Log Out</a>'; } else { echo '<a href="'.get_bloginfo('url').'/my-account/">Log in</a>'; } ?>