fixed a nullpointer-exception when not logged in