Fix json login problem with locales

There was a problem when the content type contained the locale for example:

```
Content-Type: application/json; charset=UTF-8
```