@Override
	public void run() {
		for(final RefreshTokenListener listener : listeners) {
			listener.onTokenTaskBegin();
		}
		final HashMap<User, AuthSession> result = new HashMap<User, AuthSession>();
		if(Skyolauncher.isOnline) {
			try {
				final Gson gson = new Gson();
				for(final User user : users) {
					LogUtils.log(Level.INFO, LauncherConstants.REFRESH_TOKEN_PREFIX + "Refreshing access token for " + user.accountName + "...");
					final String response = ConnectionUtils.httpJsonPost(LauncherConstants.REFRESH_TOKEN_URL, gson.toJson(new SimpleSession(user.accessToken, Skyolauncher.config.clientToken)));
					final AuthSession session = gson.fromJson(response, AuthSession.class);
					if(session.accessToken != null && session.clientToken != null) {
						result.put(user, session);
					}
					else {
						final MojangError error = gson.fromJson(response, MojangError.class);
						LogUtils.log(Level.SEVERE, LauncherConstants.REFRESH_TOKEN_PREFIX + "Unable to login : " + error.error);
						LogUtils.log(Level.SEVERE, LauncherConstants.REFRESH_TOKEN_PREFIX + "Message : " + error.errorMessage);
						if(error.cause != null) {
							LogUtils.log(Level.SEVERE, LauncherConstants.REFRESH_TOKEN_PREFIX + "Cause : " + error.cause);
						}
						new UserFrame(null, user.accountName).setVisible(true);
					}
					LogUtils.log(Level.INFO, LauncherConstants.REFRESH_TOKEN_PREFIX + "Done.");
				}
			}
			catch(final Exception ex) {
				result.clear();
				ex.printStackTrace();
			}
		}
		else {
			LogUtils.log(Level.WARNING, LauncherConstants.REFRESH_TOKEN_PREFIX + "Cannot refresh your access token because you are offline !");
		}
		for(final RefreshTokenListener listener : listeners) {
			listener.onTokenTaskFinished(result);
		}
	}