public void logUserIn(String username, Socket client) {
        // adds the user to the hashset of logged in users
        synchronized (users) {
            if (!users.contains(username)) {
                users.add(username);
            }
        }

        // adds to the hashmap which maps username to sockets
        synchronized (connections) {
            if (!connections.containsKey(username)) {
                connections.put(username, client);

            }
        }
    }