Extended AuthPlain to allow header-based authentication