Error messages and authorization implemented