addes oauth2, global vars, helper methods. more TODO