Is there any reason to keep a standalone dialog instead of a text field in options page ? If not, it could be an text input field, hidden until Log In button is pressed, and after successful login (when Log Out is displayed).

We could use localhost server to receive the authorization code (as Tagger is done), and still permit cut'n'paste.