Index: /sandbox/2.4.3-expresso-rest/prototype/rest/core/LoginResource.php
===================================================================
--- /sandbox/2.4.3-expresso-rest/prototype/rest/core/LoginResource.php	(revision 7308)
+++ /sandbox/2.4.3-expresso-rest/prototype/rest/core/LoginResource.php	(revision 7308)
@@ -0,0 +1,55 @@
+<?php
+
+class LoginResource extends ExpressoAdapter {
+
+	private function getUserProfile(){
+		if($this->getExpressoVersion() != "2.2") {
+			$_SESSION['wallet']['user']['uidNumber'] = $GLOBALS['phpgw_info']['user']['account_id'];
+		}
+	
+		return array(
+				'contactID'			=> $GLOBALS['phpgw_info']['user']['account_dn'],
+				'contactMails' 		=> array($GLOBALS['phpgw_info']['user']['email']),
+				'contactPhones' 	=> array($GLOBALS['phpgw_info']['user']['telephonenumber']),
+				'contactFullName'	=> $GLOBALS['phpgw_info']['user']['fullname'],
+				'contactApps'		=> $this->getUserApps()
+		);
+	}
+	
+	private function getUserApps(){
+		// Load Granted Apps for Web Service
+		$config = parse_ini_file( __DIR__ . '/../../config/user.ini',true);
+		$apps 	= $config['Applications.mapping'];
+	
+		// Load Granted Apps for User
+		$contactApps = array();
+		$acl 	= CreateObject('phpgwapi.acl');
+		$user_id = $GLOBALS['phpgw_info']['user']['account_id']['acl'];
+		foreach($acl->get_user_applications($user_id) as $app => $value){
+			$enabledApp = array_search($app, $apps);
+			if($enabledApp !== FALSE)
+				$contactApps[] = $enabledApp;
+		}
+	
+		return $contactApps;
+	}
+	
+	public function post($request){
+		// to Receive POST Params (use $this->params)
+ 		parent::post($request);
+		if($sessionid = $GLOBALS['phpgw']->session->create($this->getParam('user'), $this->getParam('password')))
+		{
+			$result = array(
+				'auth' 			=> $sessionid.":".$GLOBALS['phpgw']->session->kp3,
+				'profile' 		=> array($this->getUserProfile())
+			);
+			$this->setResult($result);
+		}
+		else
+		{
+			Errors::runException($GLOBALS['phpgw']->session->cd_reason);
+		}
+		return $this->getResponse();
+	}	
+
+}
Index: /sandbox/2.4.3-expresso-rest/prototype/rest/core/LogoutResource.php
===================================================================
--- /sandbox/2.4.3-expresso-rest/prototype/rest/core/LogoutResource.php	(revision 7308)
+++ /sandbox/2.4.3-expresso-rest/prototype/rest/core/LogoutResource.php	(revision 7308)
@@ -0,0 +1,29 @@
+<?php
+class LogoutResource extends ExpressoAdapter {
+
+	public function post($request){
+		// to Receive POST Params (use $this->params)
+		parent::post($request);
+		
+		if($this-> isLoggedIn())
+		{	if ($_SESSION['phpgw_session']['session_id'] && file_exists($GLOBALS['phpgw_info']['server']['temp_dir'].SEP.$_SESSION['phpgw_session']['session_id']))	
+			{
+				$dh = opendir($GLOBALS['phpgw_info']['server']['temp_dir']. SEP . $_SESSION['phpgw_session']['session_id']);
+				while ($file = readdir($dh)) 
+				{
+					if ($file != '.' && $file != '..') 
+					{
+						unlink($GLOBALS['phpgw_info']['server']['temp_dir'].SEP.$_SESSION['phpgw_session']['session_id'].SEP.$file);
+					}
+				}
+				rmdir($GLOBALS['phpgw_info']['server']['temp_dir'].SEP.$_SESSION['phpgw_session']['session_id']);
+			}
+			$GLOBALS['phpgw']->hooks->process('logout');
+			$GLOBALS['phpgw']->session->destroy($_SESSION['phpgw_session']['session_id'], $GLOBALS['kp3']);
+			$this->setResult(true);
+		}
+		
+		//to Send Response (JSON RPC format)
+		return $this->getResponse();
+	}	
+}
Index: /sandbox/2.4.3-expresso-rest/prototype/rest/core/ExpressoVersionResource.php
===================================================================
--- /sandbox/2.4.3-expresso-rest/prototype/rest/core/ExpressoVersionResource.php	(revision 7308)
+++ /sandbox/2.4.3-expresso-rest/prototype/rest/core/ExpressoVersionResource.php	(revision 7308)
@@ -0,0 +1,16 @@
+<?php
+
+class ExpressoVersionResource extends ExpressoAdapter {		
+	public function post($request){
+		// to Receive POST Params (use $this->params)
+ 		parent::post($request); 		 
+ 		
+		$result = array('expressoVersion' =>  $this->getExpressoVersion(),
+						'apiVersion' => '1.0');
+ 		$this->setResult($result);
+
+		//to Send Response (JSON RPC format)
+		return $this->getResponse(); 		
+	}
+
+}
