Merge "check password only if should authenticate" into develop