Adding authentication support through angular directive