Writing your own OpenID authentication provider