Added compatability with reentrant login methods.

I think this one should be ok.