just a note, if you're veryfying the password length, I can assume that you're storing the passwords in the database as plain text.
Man, it's a high security flaw, passwords in a database MUST be hashed and salted. I'malmost sure you don't know what I'm talking about, so take a time to learn more about it, and you should start reading here: