A prototype of angular.js, snap and JWT authentication