After loading the controller with the FXMLLoader, it is possible to call for members of said controller before the show() method is invoked. One must get the reference to the controller just invoked and call a set() method from there (or access the attribute directly, if defined public).
From the example, let us suppose that the controller associated with Main.fxml is called MainController, and MainController has a user_id attribute, defined as an int. Its set method is setUser(int user). So, from the LoginController class:
// User ID acquired from a textbox called txt_user_id
int user_id =Integer.parseInt(this.txt_user_id.getText());