public void login(CustomerInfo customerInfo) {
        refreshSensorStatus();
        
        currentUser = customerInfo;
        if (mainView == null) {
            mainView = new MainView();
        }
        if (loginView != null) {
            loginView.setVisible(false);
        }
        if (signupView != null) {
            signupView.setVisible(false);
        }
        mainView.setVisible(true);
        
        this.sosafeServer.listen(ViewController.SOSAFE_SERVER_PORT_NUMBER);
        Long maxSN = this.alarmInfoJpaController.getMaxSerialNumber();
        if (maxSN != null) {
            maxAlarmSerialNumber.set(maxSN);
        }
        Long maxID = this.sensorInfoJpaController.getMaxSensorId();
        if (maxID != null) {
            maxSensorId.set(maxID);
        }
    }