Adds authentication to ui-router.