fixed #1 Smarty: Login function