Make json api act according to HTTP Basic auth spec