Implement data storing in a localStorage service