Basic Authorization logic appied to all API methods.