Changed sign out condition to 'when not AuthSourceInternal'