this could be easily done by using an if condition:
PHP Code:
if ($bbuserinfo['userid'] == 0)
{
print_no_permission();
}
this checks wether one is a user of your board and if he is not it will open the login page, if he is of course he can view that page.
I think we can change $bbuserinfo['userid'] == 0 to something like $bbuserinfo['usergroupid'] == 2 ( which is a usergroup of guests)