Add on-fly password checking.

Change-Id: Ibf2100762c757736cbfc78940add71add23075c4