dropbox: move login/logout handler into a devoted object

- Move the code that handles login/logout into a separate object
- Handle the UI for Dropbox menu