Not (necessarily) a duplicate of: Should both user ID and Password be masked for online banking?
Definitely not a duplicate of: Should usernames be kept secret?
I can sense your finger on the "mark as duplicate" button so first of all, let me clarify that for masked I do not mean secret. I mean masked only while inserting username and password, and not for the obvious reason you would expect (keeping it secret).
I remember when I was at the college, a professor of ours revealed his password to the entire classroom. His computer was connected to the projector, and he was entering his login data to access a sort of private area containing (rather unimportant) protected information. He entered the username, but then, when he was entering the password, the page unexpectedly refreshed and he ended up writing the password completely unmasked on the username field.
Of course the username was not meant to be secret, as it was just his well-known e-mail address but, you know, he was using that password for... kind of everything, including, of course, that particular restricted area.
Bottom line is: according to me, when users are entering login information, they should be into a "protected zone", in terms of UI, where they can make whatever silly mistake without their password being revealed to people watching. After this incident, I started paying attention to this issue and I found that even I did myself this mistake several times, especially when inserting SSH login data (because maybe the Enter key was just a little bit sloppy), but fortunately no one was watching.
I think the username, for public it might be, should be masked as well, to protect the password.