[#69911218] Fix malformed auth header message

- this is a duplicate of https://github.com/alphagov/backdrop/pull/284 but has been applied after taking changes to write api from upstream master!