I need help setting up server side password authentication

I am doing the following site (in Flash) for my wife’s cousin. I only have 1 sectoin left to finish.

http://stickeredvan.com/clients/MMP

When the user clicks on “sessions” I want the following to happen:

(1) Brings up input fields that asks for user name and password

(2) Once inputs are entered it will search to verify that username and password are correct

(3) If correct than load up that user’s particular gallery.

My question is how do I do the username/password authentication on server side with Flash?

Thanks.