in reply to Facebook login
You might just want to look at using the Facebook API
I've not used it, but WWW::Facebook::API might be a good place to start