added dbloginfree() to fix tds leak bug #1