Improvements to OpenID code

Makes it easier to add more OpenID providers in the future.