Unified interface for localStorage and cookies