Network stability fixes. Handles broken pipe.
Added password input