Index: branches/ClientUserManagement/HeuristicLab.Services.Access-3.3.Tests/App.config
===================================================================
--- branches/ClientUserManagement/HeuristicLab.Services.Access-3.3.Tests/App.config	(revision 6857)
+++ branches/ClientUserManagement/HeuristicLab.Services.Access-3.3.Tests/App.config	(revision 6858)
@@ -2,5 +2,5 @@
 <configuration>
   <connectionStrings>
-    <add name="HeuristicLab.Services.Directoy.DataAccess.Properties.Settings.HeuristicLab_AuthenticationConnectionString"
+    <add name="HeuristicLab.Authentication"
         connectionString="Data Source=.;Initial Catalog=HeuristicLab.Authentication;Integrated Security=True"
         providerName="System.Data.SqlClient" />
@@ -9,3 +9,30 @@
         providerName="System.Data.SqlClient" />
   </connectionStrings>
+  <system.web>
+    <membership defaultProvider="AspNetSqlMembershipProvider" userIsOnlineTimeWindow="20">
+      <providers>
+        <clear />
+        <add name="AspNetSqlMemberShipProvider"
+          type="System.Web.Security.SqlMembershipProvider"
+          connectionStringName="HeuristicLab.Authentication"
+          enablePasswordRetrieval="false"
+          enablePasswordReset="true"
+          requiresQuestionAndAnswer="false"
+          passwordFormat="Hashed"
+          applicationName="HeuristicLab.Authentication"
+          requiresUniqueEmail="false"
+          minRequiredPasswordLength="1"
+          minRequiredNonalphanumericCharacters="0"
+          maxInvalidPasswordAttempts="50" />          
+      </providers>
+    </membership>
+    <authentication mode="Windows" />
+    <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
+      <providers>
+        <clear />
+        <add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
+             connectionStringName="HeuristicLab.Authentication" applicationName="HeuristicLab.Authentication" />
+      </providers>
+    </roleManager>
+  </system.web>
 </configuration>
Index: branches/ClientUserManagement/HeuristicLab.Services.Access-3.3.Tests/UnitTest.cs
===================================================================
--- branches/ClientUserManagement/HeuristicLab.Services.Access-3.3.Tests/UnitTest.cs	(revision 6857)
+++ branches/ClientUserManagement/HeuristicLab.Services.Access-3.3.Tests/UnitTest.cs	(revision 6858)
@@ -35,8 +35,8 @@
       using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
         context.ExecuteCommand("DELETE FROM dbo.ResourceResourceGroup");
+        context.ExecuteCommand("DELETE FROM dbo.ClientLog");
         context.ExecuteCommand("DELETE FROM dbo.Resource");
         context.ExecuteCommand("DELETE FROM dbo.ClientConfiguration");
         context.ExecuteCommand("DELETE FROM dbo.ClientError");
-        context.ExecuteCommand("DELETE FROM dbo.ClientLog");
         context.ExecuteCommand("DELETE FROM dbo.ClientType");
         context.ExecuteCommand("DELETE FROM dbo.Country");
@@ -50,5 +50,5 @@
 
     [TestMethod]
-    public void AddClientTest() {
+    public void AddClientGroupTest() {
       ClearDB();
       AccessService service = new AccessService();
@@ -138,5 +138,92 @@
     }
 
-
+    [TestMethod]
+    public void AddUser() {
+      ClearDB();
+      AccessService service = new AccessService();
+
+      DT.User user = new DT.User();
+      user.FullName = "Max Mustermann";
+      user.UserName = "max";
+      user.IsApproved = true;
+      user.Comment = "this is a comment";
+      user.Email = "max@mail.com";
+
+      DT.User newUser = service.AddUser(user);
+      var users = service.GetAllUsers();
+      Assert.AreEqual(1, users.Where(x => x.UserName == newUser.UserName).Count());
+      service.DeleteUser(newUser);
+      users = service.GetAllUsers();
+      Assert.AreEqual(0, users.Where(x => x.UserName == newUser.UserName).Count());
+    }
+
+    [TestMethod]
+    public void AddUserGroup() {
+      ClearDB();
+      AccessService service = new AccessService();
+
+      DT.User user = new DT.User();
+      user.FullName = "Max Mustermann";
+      user.UserName = "max";
+      user.IsApproved = true;
+      user.Comment = "this is a comment";
+      user.Email = "max@mail.com";
+
+      DT.User user2 = new DT.User();
+      user2.FullName = "Franz Fritz";
+      user2.UserName = "Franz";
+      user2.IsApproved = true;
+      user2.Comment = "this is a franz comment";
+      user2.Email = "franz@mail.com";
+
+      DT.User newUser = service.AddUser(user);
+      DT.User newUser2 = service.AddUser(user2);
+
+      DT.UserGroup userGroup = new DT.UserGroup();
+      userGroup.Name = "testGroup";
+      userGroup.Id = service.AddUserGroup(userGroup);
+      Assert.AreEqual(1, service.GetAllUserGroups().Count());
+
+      service.AddUserGroupBaseToGroup(newUser, userGroup);
+      service.AddUserGroupBaseToGroup(newUser2, userGroup);
+      Assert.AreEqual(2, service.GetUserGroupMapping().Count());
+
+      DT.Role role = service.AddRole(new DT.Role() { Name = "NewGroup" });
+      Assert.AreEqual(1, service.GetRoles().Where(x => x.Name == role.Name).Count());
+
+      service.AddRoleToGroup(userGroup, role);
+      Assert.AreEqual(1, service.GetUserRoles(newUser).Count());
+      Assert.AreEqual(1, service.GetUserRoles(newUser2).Count());
+
+      service.RemoveRoleFromGroup(userGroup, role);
+
+      Assert.AreEqual(0, service.GetUserRoles(newUser).Count());
+      Assert.AreEqual(0, service.GetUserRoles(newUser2).Count());
+
+      service.DeleteUser(newUser);
+      service.DeleteUser(newUser2);
+      var users = service.GetAllUsers();
+      Assert.AreEqual(0, users.Where(x => x.UserName == newUser.UserName).Count());
+
+      service.DeleteRole(role);
+      Assert.AreEqual(0, service.GetRoles().Where(x => x.Name == role.Name).Count());
+    }
+
+    [TestMethod]
+    public void AddClientError() {
+      ClearDB();
+      AccessService service = new AccessService();
+
+      DT.ClientError error = new DT.ClientError();
+      error.Timestamp = DateTime.Now;
+      error.UserComment = "this happend when i clicked on...";
+      error.Exception = "Exception";
+      error.ConfigDump = "config";
+
+      service.ReportError(error);
+      Assert.AreEqual(1, service.GetClientErrors().Count());
+      service.DeleteError(service.GetClientErrors().First());
+      Assert.AreEqual(0, service.GetClientErrors().Count());
+    }
   }
 }
Index: branches/ClientUserManagement/HeuristicLab.Services.Access.DataAccess/3.3/ClientManagement.dbml
===================================================================
--- branches/ClientUserManagement/HeuristicLab.Services.Access.DataAccess/3.3/ClientManagement.dbml	(revision 6857)
+++ branches/ClientUserManagement/HeuristicLab.Services.Access.DataAccess/3.3/ClientManagement.dbml	(revision 6858)
@@ -2,5 +2,5 @@
   <Connection Mode="AppSettings" ConnectionString="Data Source=.;Initial Catalog=HeuristicLab.ClientManagement;Integrated Security=True" SettingsObjectName="HeuristicLab.Services.Access.DataAccess.Properties.Settings" SettingsPropertyName="HeuristicLab_ClientManagementConnectionString" Provider="System.Data.SqlClient" />
   <Table Name="dbo.Resource" Member="Resources">
-    <Type Name="Resource" InheritanceCode="Resource">
+    <Type Name="Resource" InheritanceCode="Resource" IsInheritanceDefault="true">
       <Column Name="Id" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
       <Column Name="Name" Type="System.String" DbType="NVarChar(MAX) NOT NULL" CanBeNull="false" />
@@ -10,7 +10,6 @@
       <Association Name="Resource_ResourceResourceGroup1" Member="ResourceResourceGroupsParents" Storage="_ResourceResourceGroups1" ThisKey="Id" OtherKey="ResourceId" Type="ResourceResourceGroup" />
       <Association Name="Resource_ClientLog" Member="ClientLogs" ThisKey="Id" OtherKey="ResourceId" Type="ClientLog" />
-      <Association Name="Resource_ClientError" Member="ClientErrors" ThisKey="Id" OtherKey="ClientId" Type="ClientError" />
       <Association Name="Resource_ResourcePlugin" Member="ResourcePlugins" ThisKey="Id" OtherKey="ResourceId" Type="ResourcePlugin" />
-      <Type Name="Client" InheritanceCode="Client" IsInheritanceDefault="true">
+      <Type Name="Client" InheritanceCode="Client">
         <Column Name="HeuristicLabVersion" Type="System.String" DbType="NVarChar(MAX)" CanBeNull="false" />
         <Column Name="MemorySize" Type="System.Int32" DbType="Int" CanBeNull="true" />
@@ -55,13 +54,10 @@
       <Column Name="ClientId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
       <Column Name="UserId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
-      <Association Name="Resource_ClientError" Member="Resource" ThisKey="ClientId" OtherKey="Id" Type="Resource" IsForeignKey="true" />
-      <Association Name="UserGroupBase_ClientError" Member="UserGroupBase" ThisKey="UserId" OtherKey="Id" Type="UserGroupBase" IsForeignKey="true" />
     </Type>
   </Table>
   <Table Name="dbo.UserGroup" Member="UserGroupBases">
-    <Type Name="UserGroupBase" InheritanceCode="UserGroupBase">
-      <Column Name="Id" AutoSync="Never" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
+    <Type Name="UserGroupBase" InheritanceCode="UserGroupBase" IsInheritanceDefault="true">
+      <Column Name="Id" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
       <Column Name="Type" Type="System.String" DbType="NVarChar(10) NOT NULL" CanBeNull="false" IsDiscriminator="true" />
-      <Association Name="UserGroupBase_ClientError" Member="ClientErrors" ThisKey="Id" OtherKey="UserId" Type="ClientError" />
       <Association Name="UserGroupBase_UserGroupUserGroup" Member="UserGroupUserGroupsChilds" Storage="_UserGroupUserGroups" ThisKey="Id" OtherKey="UserGroupId" Type="UserGroupUserGroup" />
       <Association Name="UserGroupBase_UserGroupUserGroup1" Member="UserGroupUserGroupsParents" Storage="_UserGroupUserGroups1" ThisKey="Id" OtherKey="UserGroupUserGroupId" Type="UserGroupUserGroup" />
Index: branches/ClientUserManagement/HeuristicLab.Services.Access.DataAccess/3.3/ClientManagement.dbml.layout
===================================================================
--- branches/ClientUserManagement/HeuristicLab.Services.Access.DataAccess/3.3/ClientManagement.dbml.layout	(revision 6857)
+++ branches/ClientUserManagement/HeuristicLab.Services.Access.DataAccess/3.3/ClientManagement.dbml.layout	(revision 6858)
@@ -72,11 +72,4 @@
       </nestedChildShapes>
     </classShape>
-    <associationConnector edgePoints="[(6.625 : 1.84699625651042); (10.375 : 1.84699625651042)]" fixedFrom="NotFixed" fixedTo="NotFixed">
-      <AssociationMoniker Name="/ClientManagementDataContext/Resource/Resource_ClientError" />
-      <nodes>
-        <classShapeMoniker Id="20c6e07e-aa12-43dc-87d6-dae5bf173da4" />
-        <classShapeMoniker Id="5e8ae5e1-4026-47e5-91fb-9607de024aad" />
-      </nodes>
-    </associationConnector>
     <classShape Id="452ce94a-9bd2-4968-9a5f-a0ab1dba6b2e" absoluteBounds="7.875, 3.875, 2, 1.1939925130208327">
       <DataClassMoniker Name="/ClientManagementDataContext/UserGroupBase" />
@@ -165,11 +158,4 @@
       </nodes>
     </inheritanceConnector>
-    <associationConnector edgePoints="[(9.875 : 3.90625); (10.53125 : 3.90625); (10.53125 : 2.65549967447917)]" fixedFrom="NotFixed" fixedTo="NotFixed">
-      <AssociationMoniker Name="/ClientManagementDataContext/UserGroupBase/UserGroupBase_ClientError" />
-      <nodes>
-        <classShapeMoniker Id="452ce94a-9bd2-4968-9a5f-a0ab1dba6b2e" />
-        <classShapeMoniker Id="5e8ae5e1-4026-47e5-91fb-9607de024aad" />
-      </nodes>
-    </associationConnector>
     <associationConnector edgePoints="[(9.875 : 4.53449625651042); (10.75 : 4.53449625651042)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/ClientManagementDataContext/UserGroupBase/UserGroupBase_UserGroupUserGroup" />
Index: branches/ClientUserManagement/HeuristicLab.Services.Access.DataAccess/3.3/ClientManagement.designer.cs
===================================================================
--- branches/ClientUserManagement/HeuristicLab.Services.Access.DataAccess/3.3/ClientManagement.designer.cs	(revision 6857)
+++ branches/ClientUserManagement/HeuristicLab.Services.Access.DataAccess/3.3/ClientManagement.designer.cs	(revision 6858)
@@ -197,6 +197,6 @@
 	
 	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Resource")]
-	[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="Resource", Type=typeof(Resource))]
-	[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="Client", Type=typeof(Client), IsDefault=true)]
+	[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="Resource", Type=typeof(Resource), IsDefault=true)]
+	[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="Client", Type=typeof(Client))]
 	[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="ClientGroup", Type=typeof(ClientGroup))]
 	public partial class Resource : INotifyPropertyChanging, INotifyPropertyChanged
@@ -218,6 +218,4 @@
 		
 		private EntitySet<ClientLog> _ClientLogs;
-		
-		private EntitySet<ClientError> _ClientErrors;
 		
 		private EntitySet<ResourcePlugin> _ResourcePlugins;
@@ -242,5 +240,4 @@
 			this._ResourceResourceGroups1 = new EntitySet<ResourceResourceGroup>(new Action<ResourceResourceGroup>(this.attach_ResourceResourceGroups1), new Action<ResourceResourceGroup>(this.detach_ResourceResourceGroups1));
 			this._ClientLogs = new EntitySet<ClientLog>(new Action<ClientLog>(this.attach_ClientLogs), new Action<ClientLog>(this.detach_ClientLogs));
-			this._ClientErrors = new EntitySet<ClientError>(new Action<ClientError>(this.attach_ClientErrors), new Action<ClientError>(this.detach_ClientErrors));
 			this._ResourcePlugins = new EntitySet<ResourcePlugin>(new Action<ResourcePlugin>(this.attach_ResourcePlugins), new Action<ResourcePlugin>(this.detach_ResourcePlugins));
 			OnCreated();
@@ -366,17 +363,4 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ClientError", Storage="_ClientErrors", ThisKey="Id", OtherKey="ClientId")]
-		public EntitySet<ClientError> ClientErrors
-		{
-			get
-			{
-				return this._ClientErrors;
-			}
-			set
-			{
-				this._ClientErrors.Assign(value);
-			}
-		}
-		
 		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ResourcePlugin", Storage="_ResourcePlugins", ThisKey="Id", OtherKey="ResourceId")]
 		public EntitySet<ResourcePlugin> ResourcePlugins
@@ -443,16 +427,4 @@
 		
 		private void detach_ClientLogs(ClientLog entity)
-		{
-			this.SendPropertyChanging();
-			entity.Resource = null;
-		}
-		
-		private void attach_ClientErrors(ClientError entity)
-		{
-			this.SendPropertyChanging();
-			entity.Resource = this;
-		}
-		
-		private void detach_ClientErrors(ClientError entity)
 		{
 			this.SendPropertyChanging();
@@ -1158,8 +1130,4 @@
 		private System.Nullable<System.Guid> _UserId;
 		
-		private EntityRef<Resource> _Resource;
-		
-		private EntityRef<UserGroupBase> _UserGroupBase;
-		
     #region Extensibility Method Definitions
     partial void OnLoaded();
@@ -1184,6 +1152,4 @@
 		public ClientError()
 		{
-			this._Resource = default(EntityRef<Resource>);
-			this._UserGroupBase = default(EntityRef<UserGroupBase>);
 			OnCreated();
 		}
@@ -1300,8 +1266,4 @@
 				if ((this._ClientId != value))
 				{
-					if (this._Resource.HasLoadedOrAssignedValue)
-					{
-						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
-					}
 					this.OnClientIdChanging(value);
 					this.SendPropertyChanging();
@@ -1324,8 +1286,4 @@
 				if ((this._UserId != value))
 				{
-					if (this._UserGroupBase.HasLoadedOrAssignedValue)
-					{
-						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
-					}
 					this.OnUserIdChanging(value);
 					this.SendPropertyChanging();
@@ -1337,72 +1295,4 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ClientError", Storage="_Resource", ThisKey="ClientId", OtherKey="Id", IsForeignKey=true)]
-		public Resource Resource
-		{
-			get
-			{
-				return this._Resource.Entity;
-			}
-			set
-			{
-				Resource previousValue = this._Resource.Entity;
-				if (((previousValue != value) 
-							|| (this._Resource.HasLoadedOrAssignedValue == false)))
-				{
-					this.SendPropertyChanging();
-					if ((previousValue != null))
-					{
-						this._Resource.Entity = null;
-						previousValue.ClientErrors.Remove(this);
-					}
-					this._Resource.Entity = value;
-					if ((value != null))
-					{
-						value.ClientErrors.Add(this);
-						this._ClientId = value.Id;
-					}
-					else
-					{
-						this._ClientId = default(Nullable<System.Guid>);
-					}
-					this.SendPropertyChanged("Resource");
-				}
-			}
-		}
-		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="UserGroupBase_ClientError", Storage="_UserGroupBase", ThisKey="UserId", OtherKey="Id", IsForeignKey=true)]
-		public UserGroupBase UserGroupBase
-		{
-			get
-			{
-				return this._UserGroupBase.Entity;
-			}
-			set
-			{
-				UserGroupBase previousValue = this._UserGroupBase.Entity;
-				if (((previousValue != value) 
-							|| (this._UserGroupBase.HasLoadedOrAssignedValue == false)))
-				{
-					this.SendPropertyChanging();
-					if ((previousValue != null))
-					{
-						this._UserGroupBase.Entity = null;
-						previousValue.ClientErrors.Remove(this);
-					}
-					this._UserGroupBase.Entity = value;
-					if ((value != null))
-					{
-						value.ClientErrors.Add(this);
-						this._UserId = value.Id;
-					}
-					else
-					{
-						this._UserId = default(Nullable<System.Guid>);
-					}
-					this.SendPropertyChanged("UserGroupBase");
-				}
-			}
-		}
-		
 		public event PropertyChangingEventHandler PropertyChanging;
 		
@@ -1427,5 +1317,5 @@
 	
 	[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.UserGroup")]
-	[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="UserGroupBase", Type=typeof(UserGroupBase))]
+	[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="UserGroupBase", Type=typeof(UserGroupBase), IsDefault=true)]
 	[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="User", Type=typeof(User))]
 	[global::System.Data.Linq.Mapping.InheritanceMappingAttribute(Code="UserGroup", Type=typeof(UserGroup))]
@@ -1438,6 +1328,4 @@
 		
 		private string _Type;
-		
-		private EntitySet<ClientError> _ClientErrors;
 		
 		private EntitySet<UserGroupUserGroup> _UserGroupUserGroups;
@@ -1457,5 +1345,4 @@
 		public UserGroupBase()
 		{
-			this._ClientErrors = new EntitySet<ClientError>(new Action<ClientError>(this.attach_ClientErrors), new Action<ClientError>(this.detach_ClientErrors));
 			this._UserGroupUserGroups = new EntitySet<UserGroupUserGroup>(new Action<UserGroupUserGroup>(this.attach_UserGroupUserGroups), new Action<UserGroupUserGroup>(this.detach_UserGroupUserGroups));
 			this._UserGroupUserGroups1 = new EntitySet<UserGroupUserGroup>(new Action<UserGroupUserGroup>(this.attach_UserGroupUserGroups1), new Action<UserGroupUserGroup>(this.detach_UserGroupUserGroups1));
@@ -1463,5 +1350,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true, IsDbGenerated=true)]
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]
 		public System.Guid Id
 		{
@@ -1503,17 +1390,4 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="UserGroupBase_ClientError", Storage="_ClientErrors", ThisKey="Id", OtherKey="UserId")]
-		public EntitySet<ClientError> ClientErrors
-		{
-			get
-			{
-				return this._ClientErrors;
-			}
-			set
-			{
-				this._ClientErrors.Assign(value);
-			}
-		}
-		
 		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="UserGroupBase_UserGroupUserGroup", Storage="_UserGroupUserGroups", ThisKey="Id", OtherKey="UserGroupId")]
 		public EntitySet<UserGroupUserGroup> UserGroupUserGroupsChilds
@@ -1560,16 +1434,4 @@
 				this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
 			}
-		}
-		
-		private void attach_ClientErrors(ClientError entity)
-		{
-			this.SendPropertyChanging();
-			entity.UserGroupBase = this;
-		}
-		
-		private void detach_ClientErrors(ClientError entity)
-		{
-			this.SendPropertyChanging();
-			entity.UserGroupBase = null;
 		}
 		
Index: branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/AccessService.cs
===================================================================
--- branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/AccessService.cs	(revision 6857)
+++ branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/AccessService.cs	(revision 6858)
@@ -96,4 +96,11 @@
                     select c;
         if (query.Count() > 0) {
+
+          //delete affiliation first
+          var queryMapping = context.ResourceResourceGroups.Where(x => x.ResourceId == client.Id);
+          if (queryMapping.Count() > 0) {
+            context.ResourceResourceGroups.DeleteAllOnSubmit(queryMapping);
+          }
+
           context.Resources.DeleteOnSubmit(query.First());
           context.SubmitChanges();
@@ -349,8 +356,20 @@
     public void DeleteUser(DT.User user) {
       if (user.Id != null && user.Id != Guid.Empty) {
+        //delete asp.net user
         Membership.DeleteUser(user.UserName);
         using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
-          context.UserGroupBases.DeleteOnSubmit(Convert.ToEntity(user));
-          context.SubmitChanges();
+          var query = context.UserGroupBases.OfType<DA.User>().Where(x => x.Id == user.Id);
+          if (query.Count() > 0) {
+
+            //delete affiliation first
+            var queryMapping = context.UserGroupUserGroups.Where(x => x.UserGroupId == user.Id);
+            if (queryMapping.Count() > 0) {
+              context.UserGroupUserGroups.DeleteAllOnSubmit(queryMapping);
+            }
+
+            //delete user from access db
+            context.UserGroupBases.DeleteOnSubmit(query.First());
+            context.SubmitChanges();
+          }
         }
       }
@@ -405,4 +424,6 @@
     public Guid AddUserGroup(DT.UserGroup group) {
       using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
+        //because id is not automatically set because of user, we have to do it here manually for group
+        group.Id = Guid.NewGuid();
         context.UserGroupBases.InsertOnSubmit(Convert.ToEntity(group));
         context.SubmitChanges();
@@ -464,21 +485,62 @@
     #region Roles
     public IEnumerable<DT.Role> GetRoles() {
-      throw new System.NotImplementedException();
+      using (DA.ASPNETAuthenticationDataContext context = new DA.ASPNETAuthenticationDataContext()) {
+        var query = from u in context.aspnet_Roles
+                    select Convert.ToDto(u);
+        return query.ToList();
+      }
     }
 
     public DT.Role AddRole(DT.Role role) {
-      throw new System.NotImplementedException();
-    }
-
-    public void UpdateRole(DT.Role role) {
-      throw new System.NotImplementedException();
+      Roles.CreateRole(role.Name);
+      return role;
     }
 
     public void DeleteRole(DT.Role role) {
-      throw new System.NotImplementedException();
+      Roles.DeleteRole(role.Name);
     }
 
     public IEnumerable<DT.Role> GetUserRoles(DT.User user) {
-      throw new System.NotImplementedException();
+      var roles = Roles.GetRolesForUser(user.UserName);
+      return roles.Select(x => new DT.Role() { Name = x });
+    }
+
+    public void AddRoleToGroup(DT.UserGroup userGroup, DT.Role role) {
+      Guid[] userIds;
+      string[] aspUsers;
+
+      using (DA.ClientManagementDataContext accessContext = new DA.ClientManagementDataContext()) {
+        userIds = (from u in accessContext.UserGroupUserGroups
+                   where u.UserGroupUserGroupId == userGroup.Id
+                   select u.UserGroupId).ToArray();
+      }
+
+      using (DA.ASPNETAuthenticationDataContext aspContext = new DA.ASPNETAuthenticationDataContext()) {
+        aspUsers = (from u in aspContext.aspnet_Users
+                    where userIds.Contains(u.UserId)
+                    select u.UserName).ToArray();
+      }
+
+      Roles.AddUsersToRole(aspUsers, role.Name);
+
+    }
+
+    public void RemoveRoleFromGroup(DT.UserGroup userGroup, DT.Role role) {
+      Guid[] userIds;
+      string[] aspUsers;
+
+      using (DA.ClientManagementDataContext accessContext = new DA.ClientManagementDataContext()) {
+        userIds = (from u in accessContext.UserGroupUserGroups
+                   where u.UserGroupUserGroupId == userGroup.Id
+                   select u.UserGroupId).ToArray();
+      }
+
+      using (DA.ASPNETAuthenticationDataContext aspContext = new DA.ASPNETAuthenticationDataContext()) {
+        aspUsers = (from u in aspContext.aspnet_Users
+                    where userIds.Contains(u.UserId)
+                    select u.UserName).ToArray();
+      }
+
+      Roles.RemoveUsersFromRole(aspUsers.ToArray(), role.Name);
     }
     #endregion
@@ -486,17 +548,35 @@
     #region Error Reporting
     public void ReportError(DT.ClientError error) {
-      throw new System.NotImplementedException();
+      using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
+        context.ClientErrors.InsertOnSubmit(Convert.ToEntity(error));
+        context.SubmitChanges();
+      }
     }
 
     public IEnumerable<DT.ClientError> GetClientErrors() {
-      throw new System.NotImplementedException();
+      using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
+        var query = from c in context.ClientErrors
+                    select Convert.ToDto(c);
+        return query.ToList();
+      }
     }
 
     public IEnumerable<DT.ClientError> GetLastClientErrors(DateTime startDate) {
-      throw new System.NotImplementedException();
+      using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
+        var query = from c in context.ClientErrors
+                    where c.Timestamp >= startDate
+                    select Convert.ToDto(c);
+        return query.ToList();
+      }
     }
 
     public void DeleteError(DT.ClientError error) {
-      throw new System.NotImplementedException();
+      using (DA.ClientManagementDataContext context = new DA.ClientManagementDataContext()) {
+        var query = context.ClientErrors.Where(x => x.Id == error.Id);
+        if (query.Count() > 0) {
+          context.ClientErrors.DeleteOnSubmit(query.First());
+          context.SubmitChanges();
+        }
+      }
     }
     #endregion
Index: branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/App.config
===================================================================
--- branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/App.config	(revision 6857)
+++ branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/App.config	(revision 6858)
@@ -11,11 +11,15 @@
         <clear />
         <add name="AspNetSqlMemberShipProvider"
-          type="System.Web.Security.SqlMembershipProvider"
-          connectionStringName="HeuristicLab.Authentication"
-          enablePasswordRetrieval="false"
-          enablePasswordReset="true"
-          requiresQuestionAndAnswer="false"
-          passwordFormat="Hashed"
-          applicationName="HeuristicLab.Authentication" />
+              type="System.Web.Security.SqlMembershipProvider"
+              connectionStringName="HeuristicLab.Authentication"
+              enablePasswordRetrieval="false"
+              enablePasswordReset="true"
+              requiresQuestionAndAnswer="false"
+              passwordFormat="Hashed"
+              applicationName="HeuristicLab.Authentication"
+              requiresUniqueEmail="false"
+              minRequiredPasswordLength="1"
+              minRequiredNonalphanumericCharacters="0"
+              maxInvalidPasswordAttempts="50" />
       </providers>
     </membership>
Index: branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/Convert.cs
===================================================================
--- branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/Convert.cs	(revision 6857)
+++ branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/Convert.cs	(revision 6858)
@@ -360,4 +360,17 @@
     }
     #endregion
+
+    #region Role
+    public static DT.Role ToDto(DA.aspnet_Role r) {
+      return new DT.Role() {
+        Name = r.RoleName
+      };
+    }
+    public static DA.aspnet_Role ToEntity(DT.Role r) {
+      return new DA.aspnet_Role() {
+        RoleName = r.Name
+      };
+    }
+    #endregion
   }
 }
Index: branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/IAccessService.cs
===================================================================
--- branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/IAccessService.cs	(revision 6857)
+++ branches/ClientUserManagement/HeuristicLab.Services.Access/3.3/IAccessService.cs	(revision 6858)
@@ -172,6 +172,6 @@
     Role AddRole(Role role);
 
-    [OperationContract]
-    void UpdateRole(Role role);
+    /*[OperationContract]
+    void UpdateRole(Role role);*/
 
     [OperationContract]
@@ -180,4 +180,10 @@
     [OperationContract]
     IEnumerable<Role> GetUserRoles(User user);
+
+    [OperationContract]
+    void AddRoleToGroup(UserGroup userGroup, Role role);
+
+    [OperationContract]
+    void RemoveRoleFromGroup(UserGroup userGroup, Role role);
     #endregion
 
