Changed logged_in() check to check against 'identity' instead of username/email for other identities.

Resolves issue #453