ProviderAPI refactoring.

Authenticate and Register methods are now renamed and split. It's much
more readable, the new emacs-default indentation helps to that too.