intiial changes for oauth2 and few api changes