template fixes and login-error fix.