>This gives me a good idea, but if I want to redirect to the 'tcUrl' instead of returning the html stream, how can I do that? I tried response.redirect() after authentication but still prompts me the password window.
I don't know if you can use that approach for such a need. On my next function, I need to do it as well. I'll post my result once done.