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

Test will catch that though, right? :)