Added local storage support for messages