Use setPrincipal() to set principal in createUser