Remove some attempts to add messages to users
Replace deprecated mimetype with content_type