protected Integer doInBackground() throws Exception {
            if (login.getText().isEmpty()) {
                status.setText("Login isEmpty");
                password.setText("");
                confirmPassword.setText("");
            } else {
                if (Arrays.equals(password.getPassword(), (confirmPassword.getPassword()))) {
                    UserDTO user = new UserDTO();
                    user.setLogin(login.getText());
                    user.setPassword(password.getPassword());
                    try {
                        //    this.getParent(.getOut().writeObject(new Command(CommandType.USER_REGISTRATION, user));
                        Client.getInstanse().getOut().writeObject(new Command(CommandType.USER_REGISTRATION, user));
                    } catch (IOException ex) {
                        Logger.getLogger(Registration.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    
                } else {
                    status.setText("Password !=Confirm Passsword");
                    password.setText("");
                    confirmPassword.setText("");
                }
            }
            try {
                Object object = Client.getInstanse().getIn().readObject();
                Result result = null;
                if (object instanceof Result) {
                    result = (Result) object;
                }
                if (result.isHasError()) {
                    status.setText(result.getError());
                    password.setText("");
                    confirmPassword.setText("");
                } else {
                    login.setText("");
                    password.setText("");
                    confirmPassword.setText("");
                    phone.setText("+7");
                    email.setText("");
                    
                    status.setText("Registration complite");
                }
            } catch (IOException ex) {
                Logger.getLogger(Registration.class.getName()).log(Level.SEVERE, null, ex);
            } catch (ClassNotFoundException ex) {
                Logger.getLogger(Registration.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            return 42;
        }