How can I make log in / log out menu shown in mobile menu?

Log in / Log out menu is not shown in mobile menu. How can I make it shown in mobile menu?
I used the following script to make it shown in desktop menu. My site is

add_filter( 'wp_nav_menu_items', 'wti_loginout_menu_link', 10, 2 ); function wti_loginout_menu_link( $items, $args ) { if ($args->theme_location == 'primary') { if (is_user_logged_in()) { $items .= '<li class="right"><a href="'. wp_logout_url() .'">Log Out</a></li>'; } else { $items .= '<li class="right"><a href="'. wp_login_url(get_permalink()) .'">Log In</a></li>'; } } return $items; }