Adding Open ID authentication. Refactoring.