add key based auth and custom auth middleware