funtion checkpassword is in action