Fix autoloader bug, and properly set up SMTP when debug mode is disabled