public ReportClient() {
		try {
			loginFrame = new LoginFrame();
			loginFrame.setVisible(true);
			client = new Client();
			Network.register(client.getKryo());
			client.start();
			client.connect(ReportClient.CONNECTION_TIMEOUT, "localhost", Network.PORT, Network.PORT);
			client.addListener(new Listener() { 
				@Override
				public void received(Connection con, Object o) {
					if(o instanceof ReportResponse) {
						ReportResponse res = (ReportResponse) o;
						Report r = res.getReport();
						if(r != null) {
							reportFrame.displayReport(res.getReport());
						}
					} else if (o instanceof LoginResponse) {
						loginFrame.reset();
						LoginResponse res = (LoginResponse) o;
						if(res.isAccepted()) {
							loginFrame.setVisible(false);
							reportFrame = new ReportFrame();
							reportFrame.setVisible(true);
						} else {
							JOptionPane.showMessageDialog(loginFrame, "Invalid username/password");
						}
					}
				}
			});
		} catch (IOException e) {
			JOptionPane.showMessageDialog(null, "Network error. Have you started the server?");
			e.printStackTrace();
		}
	}