user mapping is droped after swithing from principle server to mirror server
The issue you're running into most likely has to do with your users becoming orphaned on failover. Even though you're using the same logins, the SIDs are different, and don't match up with the users in the database. Basically, you need to recreate the user exactly as it is on server A.

You need to do a CREATE LOGIN with SID = xxx that will create an exact copy of the login on server A. Syntax can be found here. I use sp_help_revlogin to do this; see this knowledgebase article for more information. This will give you a CREATE LOGIN script with the same SID and password to execute on server B.

If you move to SQL Server 2012, you'll have the option of using contained databases. Contained databases can store their own logins, meaning the instance doesn't need to have its own set and preventing orphaned users. These are especially good for databases that get moved around a lot and may have users changing somewhat frequently.