private void Ok()
	{
		if(list == null)
		{
			setList();
		}
		if(loginTextField.getText().length() == 0)
		{
			JOptionPane.showMessageDialog(f, "Enter login");
			return;
		}
		if(passTextField.getText().length() == 0)
		{
			JOptionPane.showMessageDialog(f, "Enter password");
			return;
		}
		
		try {
			ConnectMethods.LogInfo info = list.Authenticate(loginTextField.getText(), passTextField.getText());
			if(info == ConnectMethods.LogInfo.INCORRECT_LOGGIN)
			{
				JOptionPane.showMessageDialog(f, "Login was not found in database, check your login");
				passTextField.setText("");
				loginTextField.setText("");
			}
			if(info == ConnectMethods.LogInfo.INCORRECT_PASS)
			{
				JOptionPane.showMessageDialog(f, "Incorrecn password, check your password");
				passTextField.setText("");
			}
			if(info == ConnectMethods.LogInfo.ALREADY_LOGGED)
			{
				JOptionPane.showMessageDialog(f, "User is already logged");
				passTextField.setText("");
			}
			if(info == ConnectMethods.LogInfo.CORRECT_DATA)
			{
				f.dispose();
				OpenProjFrame OPFrame = new OpenProjFrame(list, loginTextField.getText());
				OPFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
				OPFrame.setVisible(true);
				
			}
		} 
		catch (RemoteException e1) 
		{
			JOptionPane.showMessageDialog(f, "Disconnect from server");
			return;
		}
		catch (NullPointerException e1)
		{
			this.dispose();
			LoginFrame log = new LoginFrame();
			log.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			log.setVisible(true);
		}
	}