restore directives and client side auth