public String doLogin(String username, String password, boolean rememberMe)
    {
        String result = null;
        
        final String url = main.getConfig().getString("login.url");
        
        final Map<String, String> params = new LinkedHashMap<String, String>();
        params.put("user", username);
        params.put("password", password);
        params.put("version",
                main.getConfig().getString("login.launcherVersion"));
        
        final String request = main.getApi().postUrl(url, params);
        
        if (request.contains(":"))
        {
            final String[] parts = request.split(":");
            lastLogin = new Login();
            lastLogin.setTimestamp(Long.parseLong(parts[0]));
            lastLogin.setDownloadTicket(parts[1]);
            lastLogin.setUsername(parts[2]);
            lastLogin.setSessionId(parts[3]);
        }
        else
        {
            result = request;
        }
        
        if (result == null)
        {
            if (rememberMe)
            {
                try
                {
                    storedUsername = username;
                    storedPassword = password;
                    storeLogin(username, password);
                }
                catch (final Exception e)
                {
                    e.printStackTrace();
                }
            }
            else
            {
                deleteLogin();
            }
        }
        
        return result;
    }