Increase Login Timeout / Duration

To increase the login timeout for the wordpress backend, use the following snippet:

add_filter( 'auth_cookie_expiration', 'wpkb_stay_logged_in' );

function wpkb_stay_logged_in( $expire ) {
  return 31556926;
}

The snippet above sets the login timeout to 1 year.