SERVER-15706 Refactor internal user authentication