You can try to find out what request is being sent by the browser when you actually press the button yourself. Use a tool like
Fiddler2[
^] for that.
Then in the first step you do what you did in your existing code to setup an authenticated session. The second step would be to send a request like the one you traced with Fiddler but useing the session information from the first step (session cookies or whatever).
Hope this helps!
Regards,
Manfred