Extracted some configuration fixes and added a JAAS auth module