Extend backend security into a frontend AngularJS application