Allow both Oauth1 and Oauth2.
Read ordinary text file rather than JSON format
Moved authenticate function into main file
Minor edits