Added compatability with reentrant login methods.
Merge pull request #24 from cmfcmf/patch-3

Added compatability with reentrant login methods.