implemented authentication