Additionally you can add this to script ALL logins:
SELECT @List = COALESCE(@List+',' ,'') + loginname from syslogins
set @List = @List + ','
Instead of:
set @List = 'BBLEARN,BBLEARN_report,BBLEARN_admin,BBLEARN_cms,BBLEARN_stats'
set @List = @List + ','