private void attemptLogin() {
        if (username.length() < 2 || password.length() < 6) {
            errorMessage = "Your username must be at least 2 characters and less than 12 characters,";
            errorMessage2 = "and your password must be at least 6 characters, but less than 16 characters.";
            return;
        }
        Client c = Client.getClient();
        c.setUsername(username);
        c.setPassword(password);
        try {
            Channel channel = c.getChannel();
            channel.write(c.getConstructor().loginPacket());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }