private void attemptLogin(){
		    name = tfUsername.getText();
		    password = new String(pfPassword.getPassword());
		    if(name.isEmpty()||password.isEmpty()){
			tfUsername.setText("");
			lblLoginError.setText("Incorrect Login Credentials");
		    }
		    else{
			ip = tfServerIp.getText();
			int connected = controller.connectServer(ip,name,password);
			if(connected==0){
			    window.launchChatWindow();
			}
			else if(connected==1){
			    tfUsername.setText("");
			    lblLoginError.setText("Wrong username or password");
			}
			else if(connected==2){
			    tfUsername.setText("");
			    lblLoginError.setText("This user has logged in already");
			}
			else{
			    tfServerIp.setText("");
			    lblLoginError.setText("Server unavailable on this IP address");
			}
		    }
		}