Fix a bug that lead to leaking mfa sessions.
Merge branch 'master' into portable