changed password logic