diff --git a/plstackapi/core/models.py b/plstackapi/core/models.py
index fd679df..e4e3408 100644
--- a/plstackapi/core/models.py
+++ b/plstackapi/core/models.py
@@ -12,6 +12,12 @@
     class Meta:
         abstract = True
 
+    def save(self):
+        if not self.id:
+            self.created = datetime.date.today()
+        self.updated = datetime.datetime.today()
+        super(PlCoreBase, self).save()
+
 class Role(PlCoreBase):
 
     ROLE_CHOICES = (('admin', 'Admin'), ('pi', 'Principle Investigator'), ('user','User'))
@@ -62,17 +68,28 @@
     firstname = models.CharField(help_text="person's given name", max_length=200)
     lastname = models.CharField(help_text="person's surname", max_length=200)
     email = models.EmailField(help_text="e-mail address")
-    phone = models.CharField(help_text="phone number contact", max_length=100)
-    user_url = models.URLField()
+    phone = models.CharField(null=True, blank=True, help_text="phone number contact", max_length=100)
+    user_url = models.URLField(null=True, blank=True)
+    is_admin = models.BooleanField(default=False)
     site = models.ForeignKey(Site, related_name='site_user', verbose_name="Site this user will be homed too")
 
     def __unicode__(self):  return u'%s' % (self.email)
 
-    def save(self):
+    def save(self, *args, **kwds):
+        driver  = OpenStackDriver()
+        name = self.email[:self.email.find('@')]
+        fields = {'name': name, 'email': self.email, 'password': self.password,
+                  'enabled': self.enabled}
         if not self.id:
-            self.created = datetime.date.today()
-        self.updated = datetime.datetime.today()
-        super(User, self).save()
+            user = driver.create_user(**fields) 
+        else:
+            driver.update_user(self.user_id, **fields)
+        super(User, self).save(*args, **kwds)
+
+    def delete(self, *args, **kwds):
+        driver = OpenStackDriver()
+        driver.delete_user(self.user_id)
+        super(User, self).delete(*args, **kwds)
 
 class SitePrivilege(PlCoreBase):
 
@@ -82,11 +99,37 @@
 
     def __unicode__(self):  return u'%s %s %s' % (self.site, self.user, self.role)
 
-    def save(self):
-        if not self.id:
-            self.created = datetime.date.today()
-        self.updated = datetime.datetime.today()
-        super(SitePrivilege, self).save()
+    def save(self, *args, **kwds):
+        driver  = OpenStackDriver()
+        driver.add_user_role(user_id=user.user_id, 
+                             tenant_id=site.tenant_id, 
+                             role_name=role.name)
+        super(SitePrivilege, self).save(*args, **kwds)
+
+    def delete(self, *args, **kwds):
+        driver = OpenStackDriver()
+        driver.delete_user_role(user_id=user.user_id,
+                                tenant_id=site.tenant_id,
+                                role_name=role.name)
+        super(SitePrivilege, self).delete(*args, **kwds)
+         
+
+class DeploymentNetwork(PlCoreBase):
+    name = models.CharField(max_length=200, unique=True, help_text="Name of the Deployment Network")
+
+    def __unicode__(self):  return u'%s' % (self.name)
+
+class SiteDeploymentNetwork(PlCoreBase):
+    class Meta:
+        unique_together = ['site', 'deploymentNetwork']
+
+    site = models.ForeignKey(Site, related_name='deploymentNetworks')
+    deploymentNetwork = models.ForeignKey(DeploymentNetwork, related_name='sites')
+    name = models.CharField(default="Blah", max_length=100)
+
+
+    def __unicode__(self):  return u'%s::%s' % (self.site, self.deploymentNetwork)
+
 
 class Slice(PlCoreBase):
     tenant_id = models.CharField(max_length=200, help_text="Keystone tenant id")
@@ -136,11 +179,19 @@
 
     def __unicode__(self):  return u'%s %s %s' % (self.slice, self.user, self.role)
 
-    def save(self):
-        if not self.id:
-            self.created = datetime.date.today()
-        self.updated = datetime.datetime.today()
-        super(SliceMembership, self).save()
+    def save(self, *args, **kwds):
+        driver  = OpenStackDriver()
+        driver.add_user_role(user_id=user.user_id,
+                             tenant_id=slice.tenant_id,
+                             role_name=role.name)
+        super(SliceMembership, self).save(*args, **kwds)
+
+    def delete(self, *args, **kwds):
+        driver = OpenStackDriver()
+        driver.delete_user_role(user_id=user.user_id,
+                                tenant_id=slice.tenant_id,
+                                role_name=role.name)
+        super(SliceMembership, self).delete(*args, **kwds)
 
 class SubNet(PlCoreBase):
     subnet_id = models.CharField(max_length=256, unique=True)
@@ -172,25 +223,6 @@
         driver.delete_subnet(self.subnet_id)
         super(SubNet, self).delete(*args, **kwargs)
 
-
-
-class DeploymentNetwork(PlCoreBase):
-    name = models.CharField(max_length=200, unique=True, help_text="Name of the Deployment Network")
-
-    def __unicode__(self):  return u'%s' % (self.name)
-
-class SiteDeploymentNetwork(PlCoreBase):
-    class Meta:
-        unique_together = ['site', 'deploymentNetwork']
-
-    site = models.ForeignKey(Site, related_name='deploymentNetworks')
-    deploymentNetwork = models.ForeignKey(DeploymentNetwork, related_name='sites')
-    name = models.CharField(default="Blah", max_length=100)
-    
-
-    def __unicode__(self):  return u'%s::%s' % (self.site, self.deploymentNetwork)
-
-
 class Node(PlCoreBase):
     name = models.CharField(max_length=200, unique=True, help_text="Name of the Node")
     siteDeploymentNetwork = models.ForeignKey(SiteDeploymentNetwork, help_text="The Site and Deployment Network this Node belongs too.")
diff --git a/plstackapi/openstack/driver.py b/plstackapi/openstack/driver.py
index bdb08a9..adea9f3 100644
--- a/plstackapi/openstack/driver.py
+++ b/plstackapi/openstack/driver.py
@@ -10,27 +10,53 @@
             self.config = Config() 
         self.shell = OpenStackShell()
 
-    def create_tenant(self, **kwds):
+    def create_tenant(self, tenant_name, enabled, description):
         """Create keystone tenant. Suggested fields: name, description, enabled"""  
-        required_fields = ['tenant_name', 'enabled', 'description']
-        for field in required_fields:
-            if field not in kwds:
-                raise Exception, "Must specify %s" % field
-
-        tenants = self.shell.keystone.tenants.findall(name=kwds['tenant_name'])
+        tenants = self.shell.keystone.tenants.findall(name=tenant_name)
         if not tenants:
-            tenant = self.shell.keystone.tenants.create(**kwds)
+            fields = {'tenant_name': tenant_name, 'enabled': enabled, 
+                      'description', description}  
+            tenant = self.shell.keystone.tenants.create(**fields)
         else:
             tenant = tenants[0]
         return tenant
 
     def update_tenant(self, id, **kwds):
-        return self.shell.keystone.tenants.update(self.id, **kwds)
+        return self.shell.keystone.tenants.update(id, **kwds)
 
     def delete_tenant(self, id):
         tenant = self.shell.keystone.tenants.find(id=id)
         return self.shell.keystone.tenants.delete(tenant)
 
+    def create_user(self, name, email, password, enabled):
+        users = self.shell.keystone.users.findall(email=email)
+        if not users:
+            fields = {'name': name, 'email': email, 'password': password,
+                      'enabled': enabled}
+            user = self.shell.keystone.create(**fields)
+        else: 
+            user = users[0]
+        return user
+
+    def add_user_role(self, user_id, tenant_id, role_name):
+        user = self.shell.keystone.users.find(id=user_id)
+        tenant = self.shell.keystone.tenants.find(id=tenant_id)
+        role = self.shell.keystone.roles.find(role_name)
+        return tenant.add_user(user, role)
+
+    def delete_user_role(self, user_id, tenant_id, role_name):
+        user = self.shell.keystone.users.find(id=user_id)
+        tenant = self.shell.keystone.tenants.find(id=tenant_id)
+        role = self.shell.keystone.roles.find(role_name)
+        return tenant.delete_user(user, role)
+
+    def update_user(self, id, **kwds):
+        return self.shell.keystone.users.update(id, **kwds)
+
+    def delete_user(self, id):
+        user = self.shell.keystone.users.find(id=id)
+        return self.shell.keystone.users.delete(user)  
+
     def create_router(self, name):
         router = self.shell.quantum.create_router(name=name)
         # TODO: add router to external network
