Removed obsolete cache init
Added missing check if user is not logged in