hooked up logging, added csrf exemption, fixed deprecation warning