You should be able to just create a subclass of MembershipProvider and RoleProvider, and put your logic into the overridden methods. You don't have to implement everything - Just throw a NotImplementedException() in all the methods you don't implement. After creating your custom subclasses, you set them in your Web.config
Start with the MembershipProvider, and when you get that working, implement a RoleProvider. The bare minimum you need to implement for the MembershipProvider is the ValidateUser method (for logging in), and CreateUser and a few properties for registration (if you need registration)
Is there any particular bit you're having issues with?