Authorization using Nodejs, angularjs and javascript web tokens