I found the problem. Not believing nagios ignores invisible chars etc, I kept going and dig more. I believe other people are having the same problem as well due to the same cause.
The httpd log shows that sometimes I have username and sometimes I do not. This was a clue. A simple check of environmental variables as shown in devdaily.com/perl/edu/articl ... 0001.shtml light up the problem.
Here is the underlying problem:
I installed my nagios from RPM and follow the instructions in nagios.sourceforge.net/docs/2_0/cgiauth.html .
The RPM Install cgi-bin in /usr/lib/nagios and the documentation in /usr/share/nagios. The cgauth.html link above tell users to create .htaccess in the /usr/share/nagios/ and not in /usr/lib/nagios/cgi/. This resulting to no access or "Login as: ?".
put the .htaccess file where your cgi is. For RPM users this means: /usr/lib/nagios/cgi
It may be a good idea that someone add a note in the cgiauth.html to remind user to put .htaccess where cgi files should be. Not where documentation is. After all we want to protect access to CGI files not documentation which is freely available in the net.