permission and authentication module for angular apps