Login failed after restoring database on SQL Server 2008

After restoring a production database backup on SQL Server 2008, to my development machine, I got a “Login failed for user xyz”. The database user was not associated with a user and was marked as “Without login”. This happens when you do not have a login for the database user.  You can create that user [...]