refactored auth
added some test code for the google api