added json response type for error handling. This way laravel answers with an error code understandable by the app asking for json.
removed useless get-infos method, as this information is recovered from auth route.