Добавьте класс к кнопке, а затем укажите его в CSS.
См. Codepen: https://codepen.io/manaskhandelwal1/pen/ZEGLvaz
HTML
<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-lg btnStyle" data-toggle="modal" data-target="#logIn">Log in</button>
<!-- Modal -->
<div class="modal fade" id="logIn" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title1">Log in</h4>
</div>
<div class="modal-body">
<form class="sing_in_form">
<input type="text" placeholder="Email">
<input type="text" placeholder="password">
<p class="message"> <a href="#">Forgot password?</a></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Log in</button>
</div>
</div>
</div>
CSS
button.btnStyle {
background-color: blue;
color: white;
position: absolute;
top: 10px;
right: 10px;
}