I think you must not have the latest code ther. My code already handles it correctly.
string urlToUse = "~" + SiteUtils.GetLoginRelativeUrl();
if (CssClass.Length == 0) CssClass = "sitelink";
SiteSettings siteSettings = CacheHelper.GetCurrentSiteSettings();
if ((siteSettings != null) && (siteSettings.SiteFolderName.Length > 0))
{
urlToUse = siteSettings.SiteRoot + SiteUtils.GetLoginRelativeUrl();
}
the first line is 88 and it uses the ~ appended to the begining of relative login url and this resolves correctly as the site root. The special case handled below that line is only used if using multiple sites based on folder name instead of host name.
Best,
Joe