updates in authentication system - optimized