text selection is now preserved after display mode switch
more precise password length checking