Feature/authentication

This moves the authentication from legacy to framework.