Colin, I'm thinking you added a new problem on top of your old problem. I just read on MacFixIt that several people found their home user folder missing after the 10.5.1 update. Here's the story, with the fix:
Apple has posted a Knowledge Base article warning that your Home folder can seem to vanish into thin air. Well, that sounds scary! What's actually happened is that the folder has taken on "hidden" characteristics. The solution, Apple says, is to say this in the Terminal: chflags nohidden ~/
Apple's Knowledge Base article:
http://docs.info.apple.com/article.html?artnum=307033
As to your original problem, my wife's iMac had the exact same symptoms (including the lock in the Accounts preferences that would not lock) but I did get it fixed prior to the 10.5.1 update. I performed an Archive and Install but was very disappointed when the login problem didn't go away. Grrrr. The Archive & Install is always recommended with OS installations, but I never did it that way because I've done dozens of plain old Updates (on at least 5 different computers at home, going from 10.2 to .3 to .4 to .5) without a problem. The 10.5 update was the first one to give me trouble. Although Leopard seems at first blush to be a minor update in terms of features, there's a ton of new code under the hood. Lots to go wrong!
In any case, on my wife's computer the Archive and Install created a 13GB Previous Systems folder. That's either a drop in the bucket or a big problem. For you it's a big problem. And your 4GB of drive space is a BIG BIG problem. On any computer, once you get down to less than 20% unused drive space, your system will slow down; it's considered dangerous to go below 10%. You are at 5%. 'Nuff said.
I got my wife's user account back by following April's suggestion on this thread:
http://discussions.apple.com/message.jspa?messageID=5787456#5787456
Ignore everything on that thread except for the post from "For neXtSoft," which is signed "April." It worked for her, it worked for me and for Mikey53 -- after days of hair pulling and trying the more obvious things -- but I don't know why it worked. I'm aware of all the various ways of starting up from an installation disc, but I don't know why her way cured the login issue and the other ways I tried didn't.
Good luck -- Mark
P.S. I'm taking back my 'nuff said concerning your hard drive. Go buy a 160 GB hard drive immediately, whether you get your login problem fixed or not. I've replaced the hard drive in my Ti PowerBook three times -- it's not hard if you have the right screwdriver.
http://www.xlr8yourmac.com/powerbookg4/PB_G4_HD_upgrade/pb_g4_hdupgrade.html
The drill: I put my old hard drive in an external Firewire case, do a fresh OS install on the new hard drive, then follow the prompts after rebooting for migrating my old user data over to the new drive via Firewire. (I've also used Carbon Copy Cloner to simply clone my old drive over to the new one, but I'm not sure about CCC with Leopard.) If you feel uncomfortable doing that yourself, the Apple store (or many third parties) will do it for you, some with overnight service. Just google it.