server should respond with correct http status codes