Change password check query for security