I think I get what you're saying, and those are some good points. Let me try to summarize what I think you are saying:
1) For comparisons, strings are not what should be used - if you are using a string to frequently compare to other values, it shouldn't be a string.
2) If you have to compare strings (because they come from user input - like parsing files) they should be sanitized when received, not when compared.
Am I missing anything?
3) If you do not sanitize and need to work on strings, at least make sure you're understanding the real meaning of the data you're looking at. Compare them case-insensitive for this specific case using toupper.
About point one. So if I can't use username in the database and username given by the user as a input to compare if the user gave the correct input then what the fuck I should compare? Better example yet is searching for a username in the database without knowing the users id. String comparisons happen every day everywhere, so why they should not be used? Even when you log in to gamedev.net. We would not have compilers if we would not compare strings...