modified password input routines to allow for input through stdin