Re: “next page” link redirects to WordPress login page
Just out of curiousity, why are you sending headers from your bb-config? bbPress/Wordpress will handle this all on their own.
You also shouldn’t call the blog-header, it causes other problems you can read about around the forums. You should be calling wp-load.php and the following should be more than adequate for your bb-config;
define('WP_BB', TRUE);
if (! defined('DB_NAME'))
require_once(dirname(__FILE__) . '/w/wp-load.php');
$bb->wp_table_prefix = 'wp_'; // your wordpress db prefix is
$bb->wp_home = 'http://domain.tld';
$bb->wp_siteurl = 'http://domain.tld';
I don’t think this will solve your next page problem, as it looks like they’re being sent wrong from bbPress for whatever reason, but it will avoid a plethora of other problems before they become apparent.