An Angular factory for working with localStorage and sessionStorage