Added check password functionality