Fix error 404 when not authorized