Login and welcome pages?

I need to create a login page in my flash site that relates to information input to a mysql database. after the submit their information we want to send them a link to a differnt flash page with a login screen they will use their first name and a password (already in our database) to gain access to this “new” page. on that page there will be a welcome message that says “Welcome, User First Name”

so I guess i have two questions
1: how do i set up a login page?
2: how do i pull that login info to a welcome page?