@Override
	public void run() {
		try {
			socket = new Socket("", 1);
			br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
			writer = new PrintWriter(socket.getOutputStream(), true);
		} catch (UnknownHostException e) {
			System.out.println("[ERROR] Unknown Host! Shutting down...");
			System.exit(1);
		} catch (IOException e) {
			System.out.println("[ERROR] Error connecting to server! Shutting down...");
			System.exit(1);
		}
		
		writer.println("login:" + clientName);
		
		try {
			String back = br.readLine();
			if(back.equalsIgnoreCase("no")) {
				System.out.println("[ERROR] Client name taken");
				System.exit(-1);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		while(running) {
			writer.write("");
		}
	}