there is a C++ command to stop echo... after you type your username you stop echo, and after you type a password you rechange the line caracteristics.
In fact, you ask for something stange: init calls fork, then the child calls getty, that shows the message "login:"
After you type the username, getty calls something like
execle ("/usr/bin/login", "login" "-p" , username, (char *) 0, envp)
then login program use the argv to see what the username is, etc...
So I think that the solution is difficult, and not sure to exists, only if the system has a buffer to remember the string you typed to the keyboard between getty gives the control to login, and login gives the prompt for the password.
Sorry if I have made grammar mistakes.