If you have ever backed up a database and restored it to a new server, you may have encountered issues with the logins associated with the database. The issue is that all the logins are mapped to security contexts on the other server. It may not be apparent at first on how to fix this (nothing in the GUI that I have found), but there is a stored procedure you can run that makes it easy.

sp_change_users_login 'Update_One', 
'DatabaseUsername', 'SqlUsername'

This will map the username in the database named DatabaseUsername to the SQL Server login SqlUsername. Update_One is a parameter that tells it what type of update to do. You can also pass 'Auto_Fix' here and supply an additional password parameter to have it create the account for you.

Read the complete post at http://www.dotnettipoftheday.com/blog.aspx?id=320