fixed bug in index when not logged in