llamar modal por id href
<a href="!#" data-toggle="modal" data-target="#login">
</a>
bootstrap 4 ocultar modal a través de javascript
$('#myModal').modal('hide')
cómo mostrar bootstrap modal
<script>
var myModal = new bootstrap.Modal(document.getElementById('ModalID'))
myModal.show()
</script>