In regards to logging in you mentioned that you are storing the password encrypted in the db. Since you are encrypting the password in the db you must also encrypt the value that you enter on the login page when comparing it to the value in the db. Have you done this part? If not on your login page in the authenticate user server behavior you will need to select the password value that is coming from the form and use the format option to apply the sha1 encryption to the value. This will ensure that the value is encrypted before it is compared and if the values match you should be allowed in.
If you have done this already and still have this problem it may be because of the column in your db. You must ensure that your password column is a varchar type with at least 40 length.
As for the email password have you checked the serer behavior on this page to confirm the details for your mail server? If not please give this a try and ensure you have the proper values entered for your mail server.