Authentication module fixes and UT to 100%