public void WGLogin(String sender, String login, String hostname, Command command) {
        if(command.arguments.length == 3) {
            User user;
            boolean exists = false;
            boolean setpassword = false;
            boolean loggedin = false;
            for(Game game : games.values()) {
                user = getUserByNick(game, command.arguments[1]);
                if(user != null) {
                    exists = true;
                    if(user.passwordhash != null) {
                        setpassword = true;
                        if(user.checkPassword(command.arguments[2])) {
                            loggedin = true;
                            user.nick = sender;
                            user.login = login;
                            user.hostname = hostname;
                            if(game.autosave) {
                                saveGame(game);
                            }
                        }
                    }
                }
            }

            if(!exists) {
                sendMessageWrapper(sender, null, "The given nick does not match an account");
                return;
            }

            if(!setpassword) {
                sendMessageWrapper(sender, null, "You have not set a password! Set a password using !wgpwd with your old connection.");
                sendMessageWrapper(sender, null, "If you are not capable of setting a password, contact an admin.");
                return;
            }

            if(!loggedin) {
                sendMessageWrapper(sender, null, "Wrong password!");
                return;
            }

            sendMessageWrapper(sender, null, "Logged in succefully, your connection details have been changed.");
        }
        else {
            sendMessageWrapper(sender, null, "WGLOGIN usage: !wglogin <nick> <password>");
        }
    }