Re: function bb_auth
bb_auth calls bb_validate_auth_cookie, which calls WP_Auth::validate_auth_cookie, which uses a variable defined in bb-settings.php. The cookies you can check for are auth and logged_in, with auth automatically switching to secure_auth if you’re on SSL.