fixes error when when not logged in