More DB work; login.pl now works correctly