Disagree with the fact that the login code checks and signs out if it is already logged.  IMO this should be handled by the caller.