Bug/fix auth

fix the auth and set up date directive.