I am new to REST API and i want to authenticate a user when he/she login but i don\'t know how to call my resource from html file using JavaScript. plz someone guide me. Tha