fixed bug intoroduced in last commit that appeared when user not logged in