a) Add the following code to your frontend template index.php
<?php if ($this->countModules( 'modal' )) : ?>
<!-- This is the modal -->
<div id="modal-example" uk-modal>
<div class="uk-modal-dialog uk-modal-body">
<jdoc:include type="modules" name="modal" />
<p class="uk-text-right">
<button class="uk-button uk-button-default uk-modal-close" type="button">Cancel</button>
<button class="uk-button uk-button-primary" type="button">Save</button>
</p>
</div>
</div>
<?php endif;?>
b) Make a template position called 'modal' in template.xml
c) Place your login module in this position 'modal'.
d) You may need to override the login module to be compatible to work with ui kit as it would be bootstrap. https://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
Here is a sample of one I did for Zurb Foundation 5 modal:
https://gist.github.com/iamrobert/5a1d206279d1faad245dc7c1f1502772
e) Call the code with your button:
<a href="#modal-example" uk-toggle>Open</a>
You could also build your own module chrome (https://docs.joomla.org/Applying_custom_module_chrome) for UI Kit as well....