1. Repeated thread.
2. In okPassword(), don't use else instead keep checking for all three possibilities within the loop.
3. After loop check your status of variables.