Further changes in email authentication. Now it works fine.