Refactor to split core Auth from OAuth implementation