I'd do some username validation as well. You've gotta test if the user actually exists in the database. The code which tests the username and password against two db rows for equality is checking if the user exisits yeh? If so, this would be better:
PS: If your not encrypting your passwords in the db then you should.