A thing that always annoys me, when backup-restoring a database between database servers, is the mismatch between the sql login and database login. In some way they have the same name but some id isn't equal so they don't match. Atleast in newer versions of SQL Server you could delete one and re-map it.
Stumbled across this script that matches the server login and database login.
USE [Database]
EXEC sp_change_users_login 'Update_One', 'Username', 'Username'
This only works when the usernames match.