refactor dropbox auth