Improved security configuration for webapp.