After logout browser’s back button into twenty sixteen theme profile

You should use the built in WordPress function is_user_logged_in(), as well as several other WordPress functions:

if ( !is_user_logged_in() ) {
    wp_redirect( get_bloginfo( 'url' ) . '/index.php' );
    exit;
}

wp_redirect() handles the redirection for you. Please be aware that it does not exit automatically, so you should call it afterwards.

I also built in the WordPress Function for getting your URL – this may not be necessary in your case, as you just redirect to the front page.

Be sure that this function is called before any output is sent.