refactored auths