adding api authentication implementation