Have a look at the JMeter script in CVS, it logs in and then reads forum posts.
http://cvs.moodle.org/contrib/tools/jmeter/LoginForumView.jmx?view=log
You should be able to use the authentication code from there
Hardware and performance
Some trouble using JMeter to benchmark Moodle
This discussion has been locked so you can no longer reply to it.