Well. I've done some hacks with the plugin and now it works perfect. I try to explain what I did:
Defined this at the top of the plugin's file:
define('AUTH_KEY', 'my key from wordpress');
define('AUTH_SALT', wordpress_salt');
define('AUTH_COOKIE', 'wordpress_' . COOKIEHASH);
On the wp_generate_auth_cookie() changed the line to get the salt to this one:
$salt = ( $scheme == 'logged_in') ? apply_filters('salt', LOGGED_IN_KEY . LOGGED_IN_SALT, $scheme) : apply_filters('salt', AUTH_KEY . AUTH_SALT, $scheme);
On the wp_set_auth_cookie() added those lines just after setcookie:
setcookie(AUTH_COOKIE, $auth_cookie, $expire, $bb->cookiepath .'wp-admin', $bb->cookiedomain);
setcookie(AUTH_COOKIE, $auth_cookie, $expire, $bb->cookiepath .'wp-content/plugins', $bb->cookiedomain);
and the same after the set cookie in the if bellow that (changing $db-cookiepath by $bb->sitecookiepath).
And on the function wp_clear_auth_cookie() added this lines:
setcookie(AUTH_COOKIE, ' ', time() - 31536000, $bb->cookiepath . 'wp-admin', $bb->cookiedomain);
setcookie(AUTH_COOKIE, ' ', time() - 31536000, $bb->cookiepath . 'wp-content/plugins', $bb->cookiedomain);
setcookie(AUTH_COOKIE, ' ', time() - 31536000, $bb->sitecookiepath . 'wp-admin', $bb->cookiedomain);
setcookie(AUTH_COOKIE, ' ', time() - 31536000, $bb->sitecookiepath . 'wp-content/plugins', $bb->cookiedomain);
With this changes login/logout is working perfect in all cases and does not matter if you login or logout in WoprdPress or bbPress.
Just is a suggestion to add this changes to the plugin for everyone have a nice integration. Tested with three sites in WordPress 2.7.1 and works for me. Just you have to be careful if moved your wp-content or wp-admin to a non default location. In this case my hack will not work.