You would need to modify the source. Unfortunately, a central function isn't being used for login... for that reason, you would need to modify quite a few pages. Do a source search for "YafBuildLink.Redirect( ForumPages.login"
and you'd need to modify all elements.
If you want to help the project, you could really assist by doing the following:
1. Create a method in YAF.Classes.Utils/BuildLink.cs called "RedirectLogin()"
2. Add the basic login code -- of course, you can modify for your source.
3. Change all redirects to call the "RedirectLogin" function instead of this code:
YafBuildLink.Redirect( ForumPages.login, "ReturnUrl={0}", General.GetSafeRawUrl() );
Interested? Otherwise, you are basically doing that much modifying but the next release you'd have to do the same thing :)