auth library is refactored with a couple of changes