Add empty json response when requests are 401 and 400 on sessions endpoint

This is necessary because some JS framework don't work well when the response
is empty.
Fix .travis.yml