Restrict Login form for specific role

You can customize each role's capabilities and permissions when creating multiple user roles in Ultimate Member. However, if you want to restrict the login form for a specific role, UM restriction does not work on the Login page. The example code snippet below will be able to help restrict the login form for a particular role. It will prevent the administrator from Login via UM Login form: