Issues with login context

Fixes issues between logged in/ not logged in users