Cheers for the fix.
However, I managed to reproduce this exact error on my bbpress forum (version 0.9.0.2 with the suggested changeset 556). But strangely, only on my work pc (firefox 3 and IE7). From my home pc and on localhost the login redirects fine.
Just thought I’d point out that it still may be a potential problem.