Membership Provider

I am trying to perform a unified login from one site to another. I am able to transfer cookies from one site to another but I am having a hard time using the membership provider on one of the sites. Are there any sample code that illustrate how to log someone in and validate them so all the proper .NET membership stuff gets set?