Responding with proper HTTP codes (kinda).