I don't see how editing that template would have made it so you can't log in, it seems like something else must have happened. Can you log in as admin if you go directly to admincp/index.php?
You could also try disabling all plugins by editing your includes/config.php and adding this line:
PHP Code:
define('DISABLE_HOOKS', true);
right after the <?php line at the top.