public void run() 
	{
		ServerMessage m;
		try {
			m = (ServerMessage) input.readObject();
			
			String message = m.getCommand();
			
			if(message.equals("JOIN"))
			{
				//Add to the list of users
				this.dataAccess.join(m.getUser());
				System.out.println("got join request");
			}else if(message.equals("LEAVE"))
			{
				//Remove from list of users
				this.dataAccess.leave(m.getUser());
				System.out.println("got leave request");				
			}else if(message.equals("LIST"))
			{
				//Returns a list of online users
				System.out.println("Got list request");
				ArrayList<UserBean> toSend = this.dataAccess.list();
				output.writeObject(toSend);
			}else if(message.equals("TEST"))
			{
				//Responds to connection tests when a client starts
				System.out.println("Got connection test msg");
				output.writeObject("ACTIVE");
			}
			socket.close();
		} catch (ClassNotFoundException e1) {
			e1.printStackTrace();
			System.out.println("Class not found exception");
		} catch (IOException e1) {
			e1.printStackTrace();
		}catch (InterruptedException e) {
			e.printStackTrace();
		}
	}