How to Restrict & Redirect Login Page
UM restriction does not work on the Login page to be able to restrict the Login Page you need to use a custom code. You can try the following code snippet to make it work:
Note: You can add the above code snippets to your theme’s functions.php or you can install the “Code Snippets” plugin to add them to your site.
Warning: We have created this code example to provide guidance and to make it easier for you to implement this code into your website. However, we are not able to provide any support when it comes to customizing the plugin. If you need help implementing this code, please hire a developer.