1. only update password field that is focused (used for setting new password)
2. fixed a bunch of js errors.