improved input method for passwords