added expiration support for localstorage only. angularjs does not support expiration with the $cookieStore module. added testing support.