updated security middleware and heroku deplyment.