I am using CakePHP as a REST API for a single-page app.
Every request gets authenticated and authorized before proceeding.
The problem is, on logging in, if the credentials are wrong, Cake returns 401 and the browser shows its own server log in a popup.
I believe there is a way to stop it by unsetting the WWW-authenticate header
, but I need to know how. Can someone explain how to unset that header?