added logger
add some debug log useful to troubleshooting redirect loop issuess