Your code seems to be in good shape and correct. However, you have multiple instances of the same ID, such as "email", "password", and "submit". IDs should be unique within the DOM to avoid potential errors. Fixing this issue may resolve any issues you are experiencing.
It appears that your code is functioning properly with the latest jQuery and Bootstrap CDN.
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
UPDATED
If your Bootstrap script is working correctly, the URL of the page should not change when clicking on navigation pills. Therefore, everything should function smoothly after a page reload. If the URL does change when interacting with the pills, there may be another script interfering with the behavior of Bootstrap.