more refactoring. Auth service and Resources service. Adding directives