How to prevent users to log in to the site if cookies were denied?
If you want to prevent users to log in on Joomla! if they decline the cookies policy, you just have to enable two parameters.
1. Navigate to the tab "Styling" and enabled the "locked overlay" parameter, as you can see in the screenshot below.
2. Navigate to the tab "Advanced Settings" and choose the option "Enabled" for the "Block Cookies Functionality" parameter, and the option "No", for the "Allow Session Cookies" parameter, as you can see in the screenshot below.
3. Save the settings, and now the User will not be able to login at Joomla! if has not accepted to the cookies policy.