Added oauth to API, still some issue and problems though