Cleanup, removing old oauth references
Refactored authorization code
work in progress
merging tests
Refactored auth