validate password and login