Index: main/waeup.sirp/trunk/src/waeup/sirp/browser/layout.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/browser/layout.py	(revision 7234)
+++ main/waeup.sirp/trunk/src/waeup/sirp/browser/layout.py	(revision 7240)
@@ -32,4 +32,5 @@
 from waeup.sirp.browser.theming import get_all_themes, WAeUPThemeGray1
 from waeup.sirp.students.interfaces import IStudentNavigation
+from waeup.sirp.applicants.interfaces import IApplicant
 from waeup.sirp.authentication import get_principal_role_manager
 
@@ -163,6 +164,4 @@
         if usertitle == 'Unauthenticated User':
             return u'Anonymous User'
-        elif usertitle == 'Applicant':
-            return self.request.principal.id
         return usertitle
 
@@ -172,4 +171,16 @@
         userid = self.request.principal.id
         return userid
+
+    def isStudent(self):
+        usertype = getattr(self.request.principal, 'user_type', None)
+        if not usertype:
+            return False
+        return self.request.principal.user_type == 'student'
+
+    def isApplicant(self):
+        usertype = getattr(self.request.principal, 'user_type', None)
+        if not usertype:
+            return False
+        return self.request.principal.user_type == 'applicant'
 
     def getStudentName(self):
@@ -180,9 +191,10 @@
         return
 
-    def isStudent(self):
-        prm = get_principal_role_manager()
-        roles = [x[0] for x in
-            prm.getRolesForPrincipal(self.request.principal.id)]
-        return 'waeup.Student' in roles
+    def getApplicantName(self):
+        """Return the applicant name.
+        """
+        if IApplicant.providedBy(self.context):
+            return self.context.fullname
+        return
 
     def update(self):
@@ -209,5 +221,5 @@
 
     def render(self):
-        if self.isStudent() or not self.isAuthenticated():
+        if self.isStudent() or self.isApplicant() or not self.isAuthenticated():
             return self.studenttemp.render(self)
         return self.stafftemp.render(self)
Index: main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py	(revision 7234)
+++ main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py	(revision 7240)
@@ -150,9 +150,4 @@
     camefrom = None
 
-    def isStudent(self):
-        prm = get_principal_role_manager()
-        roles = [x[0] for x in prm.getRolesForPrincipal(self.request.principal.id)]
-        return 'waeup.Student' in roles
-
     def update(self, SUBMIT=None, camefrom=None):
         self.camefrom = camefrom
@@ -160,6 +155,12 @@
             if self.request.principal.id != 'zope.anybody':
                 self.flash('You logged in.')
-                if self.isStudent():
+                if self.request.principal.user_type == 'student':
                     rel_link = '/students/%s' % self.request.principal.id
+                    self.redirect(self.application_url() + rel_link)
+                    return
+                elif self.request.principal.user_type == 'applicant':
+                    container, application_number = self.request.principal.id.split('_')
+                    rel_link = '/applicants/%s/%s' % (
+                        container, application_number)
                     self.redirect(self.application_url() + rel_link)
                     return
@@ -222,8 +223,10 @@
             email_from = self.config.email_admin
         username = self.request.principal.id
+        usertype = getattr(self.request.principal,
+                           'user_type', 'system').title()
         body = data['body']
         email_to = self.config.email_admin
         subject = self.config.email_subject
-        success = send_mail(fullname,username,self.config.name,
+        success = send_mail(fullname,username,usertype,self.config.name,
                   body,email_from,email_to,subject)
         if success:
@@ -248,5 +251,6 @@
         email_to = self.config.email_admin
         subject = self.config.email_subject
-        success = send_mail(fullname,username,self.config.name,
+        usertype = u'Anonymous'
+        success = send_mail(fullname,username,usertype,self.config.name,
                   body,email_from,email_to,subject)
         if success:
@@ -467,8 +471,10 @@
             email_from = self.config.email_admin
         username = self.request.principal.id
+        usertype = getattr(self.request.principal,
+                           'user_type', 'system').title()
         body = data['body']
         email_to = self.context.email
         subject = self.config.email_subject
-        success = send_mail(fullname,username,self.config.name,
+        success = send_mail(fullname,username,usertype,self.config.name,
                   body,email_from,email_to,subject)
         if success:
Index: main/waeup.sirp/trunk/src/waeup/sirp/browser/static/waeup-base.css
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/browser/static/waeup-base.css	(revision 7234)
+++ main/waeup.sirp/trunk/src/waeup/sirp/browser/static/waeup-base.css	(revision 7240)
@@ -70,5 +70,5 @@
 
 .studentmenu {
-  text-align: center;
+  text-align: left;
   line-height: 2;
 }
Index: main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/studentsitelayout.pt
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/studentsitelayout.pt	(revision 7234)
+++ main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/studentsitelayout.pt	(revision 7240)
@@ -56,7 +56,13 @@
 
         <div class="yui-b">
-          <div class="block" tal:condition="layout/getStudentName">
+          <div class="block" >
             <div class="studentmenu">
-              <tal:left content="structure provider:top_student" />
+              <div tal:condition="layout/getStudentName"
+                   tal:replace="structure provider:top_student">
+                Student Links
+              </div>
+              <div tal:content="structure provider:actionbar">
+                Student Actions
+              </div>
             </div>
           </div>
@@ -89,5 +95,4 @@
                   <div tal:replace="structure view/content"> THE CONTENT
                   </div>
-                  <span tal:replace="structure provider:actionbar"></span>
                 </div>
               </div>
