In the case of Mail.app and Entourage, both heavy keychain users, errors in your keychain will cause strange behavior. If you find any app hanging at the time a login is happening or get the Entourage error "The action could not be completed. System error occurred (-50)", it is time to repair your keychain.
Apple has created the Keychain First Aid program to help in this case, and put up a Knowledge Base article about it (where you can also download the program). Often, many strange problems will disappear once you have a properly functional keychain again.

