checking authorisation header before sending data