issue #1 Smarty: Login function