Just in case anyone is looking for answer to this question:
There is event observer which looks for previous url and login actions. Here is the code:
use Magento\Framework\Event\Observer as EventObserver;
class CustomerAuthenticated implements ObserverInterface
* Core store config
* @var \Magento\...
Check the priority value of the rules - the lower the value the higher the priority. Make sure all rules which will be overridden are set to a higher value than your top priority rule.
Then, on the top priority rule, under 'Actions' set 'Discard subsequent rules' to 'Yes', which will stop the lower priority rules from being applied after it.