Thanks a lot guys. You got me on the right way and I looked for a wordpress solution instead of a civi one.
I just added the following bits of code to my function.php file (in the child theme) to get disconnected and immediately redirected to a specific page (otherwise I was getting a civicrm error telling me I had no access to the page it was redirecting me to) :
/**
* WordPress function to prevent autologin
*/
function user_autologout(){
wp_logout();
}
add_action('user_register','user_autologout');
/**
* WordPress function for redirecting users on logout. If user comes from registration page, they are directed to a page telling them that their membership request is pending.
*/
function auto_redirect_after_logout(){
if (strpos($_SERVER['HTTP_REFERER'], 'inscription') !== false){
wp_redirect( home_url().'/pending_registration/' );
exit();
}
else{
wp_redirect( home_url() );
exit();
}
}
add_action('wp_logout','auto_redirect_after_logout');