public Authentication(AdminClient parent) {
		super("resources/UmbrellaSignIn.png");
		this.parent = parent;
		this.parent.setTitle("Authentication");
		if(AdminClient.client == null) {
			try {
				AdminClient.client = new Client("127.0.0.1", 1234);
			}catch (IOException e) {
				javax.swing.SwingUtilities.invokeLater(new Runnable() {
					
					public void run() {
						new SwitchServerWindow();
					}
				});
			}
		}
		//Window's components.
		this.setSize(new Dimension(800, 600));
		this.setLayout(null);
		
		RotatingComponent rc = new RotatingComponent("resources/UmbrellaLogo.png", 95, 97, 255, 255, 0.5);
		authPanel = new GradientPanel(new Color(173, 173, 173), new Color(78, 78, 78));
		authPanel.setBounds(425, 200, 300, 58);
		authPanel.setLayout(null);
		
		authPanel.setBorder(BorderFactory.createLineBorder(new Color(60, 10, 11), 1));
		
		AdminClient.serverLocator.setEnabled(true);
		
		shacker = new Shaker(authPanel);
		
		tfUserName.setBorder(BorderFactory.createLineBorder(new Color(123, 0, 1), 2));
		pfPassword.setBorder(BorderFactory.createLineBorder(new Color(123, 0, 1), 2));
		
		lUserName.setBounds(70, 8, 40, 23);
		//lUserName.setBorder(BorderFactory.createLineBorder(Color.BLACK));
		
		lPassword.setBounds(15, lUserName.getY() + lUserName.getHeight() - 4, 100, 25);
		//lPassword.setBorder(BorderFactory.createLineBorder(Color.BLACK));
		
		authPanel.add(lUserName);
		authPanel.add(lPassword);
		
		tfUserName.setBounds(lUserName.getX() + lUserName.getWidth(), 8, 145, lUserName.getHeight() - 3);
		pfPassword.setBounds(lUserName.getX() + lUserName.getWidth(), lPassword.getY() + 4, tfUserName.getWidth(), tfUserName.getHeight() + 2);
		
		authPanel.add(tfUserName);
		authPanel.add(pfPassword);
		
		progress = new SpinningWheel(5, 0, 20, 55);
		progress.setVisible(false);
		
		correct = new JBackgroundedPanel("resources/Correct.png", 5, 0, 20, 20);
		correct.setVisible(false);
		
		error = new JBackgroundedPanel("resources/Error.png", 5, 0, 20, 20);
		error.setVisible(false);
		
		bSignIn.setIcon(new ImageIcon(Utilities.resizeImage(20, 20, "resources/NextButton.png")));
		bSignIn.setBounds(5, 23, bSignIn.getIcon().getIconWidth(), bSignIn.getIcon().getIconHeight());
		bSignIn.setBorderPainted(false);
		bSignIn.setContentAreaFilled(false);
		bSignIn.setFocusable(false);
		
		JPanel panelAux = new JPanel();
		panelAux.setLayout(null);
		panelAux.setBounds(tfUserName.getX() + tfUserName.getWidth() + 5, lUserName.getY(), 50, 50);
		panelAux.setOpaque(false);
		
		panelAux.add(correct);
		panelAux.add(error);
		panelAux.add(progress);
		panelAux.add(bSignIn);
		
		authPanel.add(panelAux);
		
		this.add(rc);
		this.add(authPanel);
		
		//Component's listeners
		tfUserName.addFocusListener(this);
		pfPassword.addFocusListener(this);
		tfUserName.getDocument().addDocumentListener(this);
		bSignIn.addActionListener(this);
		pfPassword.addKeyListener(this);
		
		
	}