Add a JSON response to editPassword and correct the CSRF token field in login.