Your if statement looks ok to me, but I am not sure about the SQL.
You are selecting only 'password', but then trying to dbpass = rs.getString(4);
You could try dbpass = rs.getString("password");
Or if you want all strings/field in the recordset available I would use:
select * from myusers WHERE username
you could then use rs.getString(1); rs.getString(2); ... etc
Also you should try writing the value of dbpass to the screen to check its value is correct:
Remember Java is case sensitive, so make sure you enter password correctly.