Looping through a dataset, comparing values to another dataset

I have two datasets. One(DFlogin) contains a set of user ids, and two digit "zip codes" they attempted to log in from. The other(Dfrecords) contains a list of acceptable "zip codes" for the user to log in from.

For a user, they could have any number of attempted log in zip codes, and any number of acceptable, record zip codes.

The goal is to loop through the rows of the DFlogin dataset, and compare each users attempted logins to all of the acceptable logins for the specific user.

So user 1 can login in zipcode 34 only, but has logged in from zip code 21. This user should be flagged in a new column (bad_login).