Key checking and Basic auth