improved openid monkey patch