Index: trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java	(revision 2780)
+++ trunk/src/org/openstreetmap/josm/gui/io/ChangesetManagementPanel.java	(revision 2781)
@@ -76,5 +76,5 @@
         gc.weighty = 0.0;
         gc.insets = new Insets(0, 0, 5, 0);
-        add(new JMultilineLabel("Please decide what changeset data is uploaded to an whether to close the changeset after the next upload."), gc);
+        add(new JMultilineLabel(tr("Please decide what changeset data is uploaded to an whether to close the changeset after the next upload.")), gc);
 
         gc.gridwidth = 4;
@@ -134,4 +134,5 @@
         btnClose.setMargin(new Insets(0,0,0,0));
         cbOpenChangesets.addItemListener(closeChangesetAction);
+        rbExisting.addItemListener(closeChangesetAction);
         add(btnClose, gc);
 
@@ -299,5 +300,5 @@
 
         public void actionPerformed(ActionEvent e) {
-            DownloadOpenChangesetsTask task = new DownloadOpenChangesetsTask(model);
+            DownloadOpenChangesetsTask task = new DownloadOpenChangesetsTask(ChangesetManagementPanel.this);
             Main.worker.submit(task);
         }
@@ -324,5 +325,9 @@
 
         protected void refreshEnabledState() {
-            setEnabled(cbOpenChangesets.getModel().getSize() > 0 && cbOpenChangesets.getSelectedItem() != null);
+            setEnabled(
+                    cbOpenChangesets.getModel().getSize() > 0
+                    && cbOpenChangesets.getSelectedItem() != null
+                    && rbExisting.isSelected()
+            );
         }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java	(revision 2780)
+++ trunk/src/org/openstreetmap/josm/gui/io/DownloadOpenChangesetsTask.java	(revision 2781)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.awt.Component;
 import java.io.IOException;
 import java.util.List;
@@ -15,4 +16,5 @@
 import org.openstreetmap.josm.data.osm.UserInfo;
 import org.openstreetmap.josm.gui.ExceptionDialogUtil;
+import org.openstreetmap.josm.gui.JosmUserIdentityManager;
 import org.openstreetmap.josm.gui.PleaseWaitRunnable;
 import org.openstreetmap.josm.io.ChangesetQuery;
@@ -25,5 +27,4 @@
  * This is a task for downloading the open changesets of the current user
  * from the OSM server.
- *
  */
 public class DownloadOpenChangesetsTask extends PleaseWaitRunnable {
@@ -32,7 +33,6 @@
     private OsmServerChangesetReader reader;
     private List<Changeset> changesets;
-    private OpenChangesetComboBoxModel model;
     private Exception lastException;
-    private UserInfo userInfo;
+    private Component parent;
 
     /**
@@ -41,7 +41,7 @@
      * after download
      */
-    public DownloadOpenChangesetsTask(OpenChangesetComboBoxModel model) {
-        super(tr("Downloading open changesets ...", false /* don't ignore exceptions */));
-        this.model = model;
+    public DownloadOpenChangesetsTask(Component parent) {
+        super(parent, tr("Downloading open changesets ..."), false /* don't ignore exceptions */);
+        this.parent = parent;
     }
 
@@ -49,11 +49,28 @@
     protected void cancel() {
         this.cancelled = true;
-        reader.cancel();
+        synchronized(this) {
+            if (reader != null) {
+                reader.cancel();
+            }
+        }
     }
 
     @Override
     protected void finish() {
-        if (cancelled)
+        if (JosmUserIdentityManager.getInstance().isAnonymous()) {
+            JOptionPane.showMessageDialog(
+                    JOptionPane.getFrameForComponent(parent),
+                    tr("<html>Could not retrieve the list of your open changesets because<br>"
+                            + "JOSM doesn't know your identity.<br>"
+                            + "You've either chosen to work anonymously or you are not entitled<br>"
+                            + "to know the identity of the user on whose behalf you are working."
+                            + "</html>"
+                    ),
+                    tr("Missing user identity"),
+                    JOptionPane.ERROR_MESSAGE
+            );
             return;
+        }
+        if (cancelled)return;
         if (lastException != null) {
             ExceptionDialogUtil.explainException(lastException);
@@ -67,4 +84,5 @@
                     JOptionPane.INFORMATION_MESSAGE
             );
+            return;
         }
         SwingUtilities.invokeLater(
@@ -78,13 +96,30 @@
 
     /**
-     * Fetch the user info from the server. This is necessary if we don't know
-     * the users id yet
+     * Refreshes the user info from the server. This is necessary if we don't know
+     * the users id yet.
      *
-     * @return the user info
-     * @throws OsmTransferException thrown in case of any communication exception
      */
-    protected UserInfo fetchUserInfo() throws OsmTransferException {
-        OsmServerUserInfoReader reader = new OsmServerUserInfoReader();
-        return reader.fetchUserInfo(getProgressMonitor().createSubTaskMonitor(1, false));
+    protected void refreshUserIdentity(){
+        JosmUserIdentityManager im = null;
+        try {
+            OsmServerUserInfoReader reader = new OsmServerUserInfoReader();
+            UserInfo info = reader.fetchUserInfo(getProgressMonitor().createSubTaskMonitor(1, false));
+            im = JosmUserIdentityManager.getInstance();
+            im.setFullyIdentified(info.getDisplayName(), info);
+        } catch(OsmTransferException e) {
+            // retrieving the user info can fail if the current user is not authorised to
+            // retrieve it, i.e. if he is working with an OAuth Access Token which doesn't
+            // have the respective privileges or if he didn't or he can't authenticate with
+            // a username/password-pair.
+            //
+            // Downgrade your knowlege about its identity if we've assumed that he was fully
+            // identified. Otherwise, if he is anonymous or partially identified, keep our level
+            // of knowlege.
+            //
+            if (im.isFullyIdentified()) {
+                im.setPartiallyIdentified(im.getUserName());
+            }
+            System.err.println(tr("Warning: Failed to retrieve user infos for the current JOSM user. Exceptions was: {0}", e.toString()));
+        }
     }
 
@@ -92,12 +127,29 @@
     protected void realRun() throws SAXException, IOException, OsmTransferException {
         try {
-            if (model.getUserId()== 0) {
-                userInfo = fetchUserInfo();
-                model.setUserId(userInfo.getId());
+            JosmUserIdentityManager im = JosmUserIdentityManager.getInstance();
+            if (im.isAnonymous()) {
+                refreshUserIdentity();
+            } else if (im.isFullyIdentified()){
+                // do nothing
+            } else if (im.isPartiallyIdentified()) {
+                refreshUserIdentity();
             }
-            if (cancelled)
+            if (cancelled)return;
+            synchronized(this) {
+                reader = new OsmServerChangesetReader();
+            }
+            ChangesetQuery query = new ChangesetQuery().beingOpen(true);
+            if (im.isAnonymous())
+                // we still don't know anything about the current user. Can't retrieve
+                // its changesets
                 return;
-            reader = new OsmServerChangesetReader();
-            ChangesetQuery query = new ChangesetQuery().forUser((int)model.getUserId()).beingOpen(true);
+            else if (im.isFullyIdentified()) {
+                query = query.forUser(im.getUserId());
+            } else {
+                // we only know the users name, not its id. Nevermind, try to read
+                // its open changesets anyway.
+                //
+                query = query.forUser(im.getUserName());
+            }
             changesets = reader.queryChangesets(
                     query,
Index: trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java	(revision 2780)
+++ trunk/src/org/openstreetmap/josm/gui/io/OpenChangesetComboBoxModel.java	(revision 2781)
@@ -13,10 +13,10 @@
 
 /**
- * A combobox model for the list of open changesets
- *
+ * A combobox model for the list of open changesets. The model is populated with the list
+ * of open changesets kept in the {@see ChangesetCache}.
+ * 
  */
 public class OpenChangesetComboBoxModel extends DefaultComboBoxModel implements ChangesetCacheListener {
     private List<Changeset> changesets;
-    private long uid;
     private Changeset selectedChangeset = null;
 
@@ -32,4 +32,8 @@
     }
 
+    /**
+     * Refreshes the content of the combobox model with the current list of open
+     * changesets from the {@see ChangesetCache}.
+     */
     public void refresh() {
         changesets.clear();
@@ -38,5 +42,5 @@
         int idx = changesets.indexOf(selectedChangeset);
         if (idx < 0) {
-            setSelectedItem(null);
+            selectFirstChangeset();
         } else {
             setSelectedItem(changesets.get(idx));
@@ -44,12 +48,7 @@
     }
 
-    public void setUserId(long uid) {
-        this.uid = uid;
-    }
-
-    public long getUserId() {
-        return uid;
-    }
-
+    /**
+     * Selects the first changeset in the current list of open changesets
+     */
     public void selectFirstChangeset() {
         if (changesets == null || changesets.isEmpty()) {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java	(revision 2780)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerChangesetReader.java	(revision 2781)
@@ -48,5 +48,5 @@
      * @return the list of changesets read from the server
      * @throws IllegalArgumentException thrown if query is null
-     * @throws OsmTransferException
+     * @throws OsmTransferException thrown if something goes wrong w
      */
     public List<Changeset> queryChangesets(ChangesetQuery query, ProgressMonitor monitor) throws OsmTransferException {
Index: trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java	(revision 2780)
+++ trunk/src/org/openstreetmap/josm/io/OsmServerUserInfoReader.java	(revision 2781)
@@ -121,9 +121,8 @@
     }
 
-
-
     public UserInfo fetchUserInfo(ProgressMonitor monitor) throws OsmTransferException {
         try {
-            monitor.beginTask(tr("Reading user info ..."));
+            monitor.beginTask(tr(""));
+            monitor.indeterminateSubTask(tr("Reading user info ..."));
             InputStream in = getInputStream("user/details", monitor.createSubTaskMonitor(1, true));
             return buildFromXML(
