Disconnect automattically after X minutes

By default, the “Remember Me” checkbox makes you get remembered for 14 days. This is filterable though.

add below code in your theme functions.php where 31556926 = 1 year in seconds

This code will change that value:

add_filter( 'auth_cookie_expiration', 'keep_me_logged_in_for_1_year' );

function keep_me_logged_in_for_1_year( $expirein ) {
    return 31556926; // 1 year in seconds
}

tech