When the logins were created on the QA server they were not created with the same SID as the production server. Hence when the backup is restored, the SID in the database for the user does not match the SID of the login. It's called orphaned users.
Best way to fix it permanently is to drop all logins, script the logins from production with their SIDs and then run that script on QA. Once that's done, any backup from production that's restored will have the same SID for user and login and the logins will automatically work,
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass