javascript libraries for api stateless authentication