Implement oauth2 and search