Try removing the show
class from your first div
:
<div id="loginModal" class="modal" tabindex="-1" role="dialog" aria-hidden="true">
Instead, you could use fade
if you want an effect when the modal pops up
<div id="loginModal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">