Added Wordpress authentication for functions