Fixed undefined offset error.

Made the constant check for a valid API Key and added in a feature check
on the admin functions based on that check.