private void logout() {
        try {
            sendToServer(Packet.getLogoutPacket());
            PacketManager.readPacketFromStream(in);
        } catch(Exception e) {}

        try {
            out.close();
        } catch(Exception e) {}
        try {
            in.close();
        } catch(Exception e) {}
        try {
            socket.close();
        } catch(Exception e) {}
        
        dispose();
    }