Fixed password behavior and text cleared when installation fails

Fix for #3148 and #2477