Problem one- I'm not sure which website URL I should use. The actual login page or the the URL that is being called when the form is submitted.
You'll need to use the URL that the login form submits it's information to - not the login page itself (you look at that page to get the values to submit and where to submit them too).
(disclaimer: not a cURL expert, but I know how html forms work)
since you are using php you might want to look at fsockopen - it might be easier to do what you want with that since it's more low-level than cURL (you can capture the traffic between your browser and youtube/google with firefox and "live http headers" addon and easily adapt it to work over a raw fsockopen connection).