Avoid Entering Username and Passwords After Restoring iOS

If you restore your iOS (iPhone or iPad) from a backup in iTunes, you’ll find you need to re-enter your usernames and passwords for all your email accounts.

Simply tick the Encrypt iPhone Backups option in the device summary tab in iTunes and enter a password to secure your backups. iTunes will now backup and restore your sensitive data, usernames, passwords and MobileMe data, and do so securely.