added 404 and authentication