Index: trunk/src/org/openstreetmap/josm/data/ServerSidePreferences.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/ServerSidePreferences.java	(revision 3527)
+++ trunk/src/org/openstreetmap/josm/data/ServerSidePreferences.java	(revision 3528)
@@ -146,5 +146,4 @@
 
     public void download(String userName, String password) {
-        resetToDefault();
         if (!properties.containsKey("osm-server.username") && userName != null) {
             properties.put("osm-server.username", userName);
@@ -153,10 +152,17 @@
             properties.put("osm-server.password", password);
         }
+        download();
+    }
+
+    public boolean download() {
+        resetToDefault();
         String cont = connection.download();
-        if (cont == null) return;
+        if (cont == null) return false;
         Reader in = new StringReader(cont);
+        boolean res = false;
         try {
             XmlObjectParser.Uniform<Prop> parser = new XmlObjectParser.Uniform<Prop>(in, "tag", Prop.class);
             for (Prop p : parser) {
+                res = true;
                 properties.put(p.key, p.value);
             }
@@ -164,4 +170,5 @@
             e.printStackTrace();
         }
+        return res;
     }
 
@@ -187,50 +194,3 @@
         connection.upload(b.toString());
     }
-
-    @Override public Collection<Bookmark> loadBookmarks() {
-        URL url = null;
-        try {
-            Collection<Bookmark> bookmarks;
-            bookmarks = new LinkedList<Bookmark>();
-            url = new URL("http://"+connection.serverUrl.getHost()+"/josm/bookmarks");
-            BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
-
-            for (String line = in.readLine(); line != null; line = in.readLine()) {
-                StringTokenizer st = new StringTokenizer(line, ",");
-                if (st.countTokens() != 5) {
-                    System.err.println(tr("Error: Unexpected line ''{0}'' in bookmark list from server",line));
-                    continue;
-                }
-                Bookmark b = new Bookmark();
-                b.setName(st.nextToken());
-                double[] values= new double[4];
-                for (int i = 0; i < 4; ++i) {
-                    String token = st.nextToken();
-                    try {
-                        values[i] = Double.parseDouble(token);
-                    } catch(NumberFormatException e) {
-                        System.err.println(tr("Error: Illegal double value ''{0}'' on line ''{1}'' in bookmark list from server",token,line));
-                        continue;
-                    }
-                }
-                b.setArea(new Bounds(values));
-                bookmarks.add(b);
-            }
-            in.close();
-            return bookmarks;
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
-        } catch (IllegalArgumentException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
-        } catch(SecurityException e) {
-            e.printStackTrace();
-            logger.warning(tr("Failed to load bookmarks from ''{0}'' for security reasons. Exception was: {1}",  url == null ? "null" : url.toExternalForm(), e.toString()));
-        }
-        return Collections.emptyList();
-    }
-
-    @Override public void saveBookmarks(Collection<Bookmark> bookmarks) {
-    }
 }
Index: trunk/src/org/openstreetmap/josm/gui/MainApplet.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MainApplet.java	(revision 3527)
+++ trunk/src/org/openstreetmap/josm/gui/MainApplet.java	(revision 3528)
@@ -82,23 +82,7 @@
 
     @Override public void start() {
-        String username = args.containsKey("username") ? args.get("username").iterator().next() : null;
-        String password = args.containsKey("password") ? args.get("password").iterator().next() : null;
-        if (username == null || password == null) {
-            JPanel p = new JPanel(new GridBagLayout());
-            p.add(new JLabel(tr("Username")), GBC.std().insets(0,0,20,0));
-            JTextField user = new JTextField(username == null ? "" : username);
-            p.add(user, GBC.eol().fill(GBC.HORIZONTAL));
-            p.add(new JLabel(tr("Password")), GBC.std().insets(0,0,20,0));
-            JPasswordField pass = new JPasswordField(password == null ? "" : password);
-            p.add(pass, GBC.eol().fill(GBC.HORIZONTAL));
-            JOptionPane.showMessageDialog(null, p);
-            username = user.getText();
-            password = new String(pass.getPassword());
-            args.put("password", Arrays.asList(new String[]{password}));
-        }
-
         // initialize the plaform hook, and
         Main.determinePlatformHook();
-        // call the really early hook before we anything else
+        // call the really early hook before we do anything else
         Main.platform.preStartupHook();
 
@@ -106,5 +90,23 @@
 
         Main.pref = new ServerSidePreferences(getCodeBase());
-        ((ServerSidePreferences)Main.pref).download(username, password);
+        if(!((ServerSidePreferences)Main.pref).download()) {
+            String username = args.containsKey("username") ? args.get("username").iterator().next() : null;
+            String password = args.containsKey("password") ? args.get("password").iterator().next() : null;
+            if (username == null || password == null) {
+                JPanel p = new JPanel(new GridBagLayout());
+                p.add(new JLabel(tr("Username")), GBC.std().insets(0,0,20,0));
+                JTextField user = new JTextField(username == null ? "" : username);
+                p.add(user, GBC.eol().fill(GBC.HORIZONTAL));
+                p.add(new JLabel(tr("Password")), GBC.std().insets(0,0,20,0));
+                JPasswordField pass = new JPasswordField(password == null ? "" : password);
+                p.add(pass, GBC.eol().fill(GBC.HORIZONTAL));
+                JOptionPane.showMessageDialog(null, p);
+                username = user.getText();
+                password = new String(pass.getPassword());
+                args.put("password", Arrays.asList(new String[]{password}));
+            }
+            ((ServerSidePreferences)Main.pref).download(username, password);
+        }
+
         Main.preConstructorInit(args);
         Main.parent = frame;
