private static void logoffUser(String username, String lobbyGame,
                                   String inProgressGameName,
                                   ServerCatanGame inProgressGame) {
        // Check if the user is in a lobby game. If so, remove the user from
        // that game.
        if (lobbyGame != null) {
            synchronized (lobbyGames) {
                removePlayerFromGame(lobbyGame, username);
            }
        }
        
        // Check if the user is in an in progress game. If so, end the game.
        if (inProgressGame != null) {
            // Remove the game name from the list of in progress games
            synchronized (lobbyGames) {
                inProgressGames.remove(inProgressGameName);
            }
            
            // Notify each player to end the game
            Player playerArray[] = inProgressGame.getPlayerArray();
            
            if (playerArray != null) {
                for (int i = 0; i < playerArray.length; i++) {
                    if (!playerArray[i].getUsername().equals(username)) {
                        
                        ServerConnectionHandler handler;
                        synchronized (userList) {
                            handler = 
                                     userList.get(playerArray[i].getUsername());
                        }
                        // Notify each player besides the one logging off that
                        // the game is over.
                        if (handler != null) {
                            try {
                                handler.sendGameOverMsg();
                            } catch (Exception e) {
                                e.printStackTrace();
                            }
                        }
                    }
                }
            }
        }
        
        // Remove the user from the list of users
        synchronized (userList) {
            userList.remove(username);
        }
        
        printServerMsg("Successfully logged off user '" + username + "'!");
    }