Add logic for logged-in-state (bug 1103072)

Is this required? Looks like there's no code that will run after this.