Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 8852)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 8853)
@@ -1083,7 +1083,8 @@
         # Send email with credentials
         login_url = self.url(grok.getSite(), 'login')
+        url_info = u'Login: %s' % login_url
         msg = _('You have successfully been registered for the')
         if kofa_utils.sendCredentials(IUserAccount(applicant),
-            password, login_url, msg):
+            password, url_info, msg):
             email_sent = applicant.email
         else:
Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 8852)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 8853)
@@ -2129,6 +2129,7 @@
         msg = _('You have successfully changed your password for the')
         login_url = self.url(grok.getSite(), 'login')
+        url_info = u'Login: %s' % login_url
         success = kofa_utils.sendCredentials(
-            IUserAccount(user),pwd,login_url,msg)
+            IUserAccount(user),pwd,url_info,msg)
         if success:
             self.flash(_('An email with your user name and password ' +
Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/loginpage.pt
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/loginpage.pt	(revision 8852)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/loginpage.pt	(revision 8853)
@@ -37,8 +37,12 @@
     If you are having trouble logging in, make sure to enable  cookies in your web browser.
   </p>
-  <p i18n:translate="login_trouble2">
+  <p i18n:translate="login_trouble2" tal:condition="python:False">
     You don't have an account because you are a fresh student, or your student record has just been created?
-    Acquire a Password Access Code (PWD) and inititialize your student account
-    <strong><a href  ="setpassword"> here</a></strong>.
+    Acquire a Password Activation Code (PWD) and inititialize your student account
+    <strong><a href ="setpassword"> here</a></strong>.
+  </p>
+  <p i18n:translate="login_trouble4">
+    You don't have an account because you are a fresh student, or your student record has just been created?
+    Inititialize your student account <strong><a href="requestpw"> here</a></strong>.
   </p>
   <p i18n:translate="login_trouble3"> Or simply forgot your student id, application id or password? Then request a new password
Index: /main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py	(revision 8852)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py	(revision 8853)
@@ -234,5 +234,5 @@
         """
 
-    def sendCredentials(user, password, login_url, msg):
+    def sendCredentials(user, password, url_info, msg):
         """Send credentials as email.
 
Index: /main/waeup.kofa/trunk/src/waeup/kofa/mandates/mandate.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/mandates/mandate.py	(revision 8852)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/mandates/mandate.py	(revision 8853)
@@ -68,5 +68,6 @@
             msg = _('Mandate expired.')
         if self._setStudentPassword():
-            msg = _('Password has been successfully set.')
+            msg = _('Password has been successfully set. '
+                    'Proceed to the login page and enter your credentials.')
         del self.__parent__[self.mandate_id]
         return msg
Index: /main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py	(revision 8852)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/mandates/tests.py	(revision 8853)
@@ -104,5 +104,6 @@
         msg = mandate.execute()
         # Password has been set.
-        self.assertEqual(msg, u'Password has been successfully set.')
+        self.assertEqual(msg, 'Password has been successfully set. Proceed to '
+            'the login page and enter your credentials.')
         self.assertTrue(IUserAccount(student).checkPassword('mypwd1'))
         # All mandates have been removed.
@@ -132,5 +133,6 @@
             % mandate.mandate_id)
         # Password has been set.
-        self.assertTrue('Password has been successfully set.'
+        self.assertTrue('Password has been successfully set. Proceed to '
+                        'the login page and enter your credentials.'
             in self.browser.contents)
         self.assertTrue(IUserAccount(student).checkPassword('mypwd1'))
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 8852)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 8853)
@@ -64,4 +64,5 @@
 from waeup.kofa.hostels.hostel import NOT_OCCUPIED
 from waeup.kofa.utils.helpers import get_current_principal, to_timezone
+from waeup.kofa.mandates.mandate import StudentPasswordMandate
 
 grok.context(IKofaObject) # Make IKofaObject the default context
@@ -1983,10 +1984,16 @@
         kofa_utils = getUtility(IKofaUtils)
         password = kofa_utils.genPassword()
-        IUserAccount(student).setPassword(password)
+        mandate = StudentPasswordMandate()
+        mandate.params['password'] = password
+        mandate.params['student_id'] = student.student_id
+        site = grok.getSite()
+        site['mandates'].addMandate(mandate)
         # Send email with credentials
-        login_url = self.url(grok.getSite(), 'login')
+        args = {'mandate_id':mandate.mandate_id}
+        mandate_url = self.url(site) + '/mandate?%s' % urlencode(args)
+        url_info = u'Confirmation link: %s' % mandate_url
         msg = _('You have successfully requested a password for the')
         if kofa_utils.sendCredentials(IUserAccount(student),
-            password, login_url, msg):
+            password, url_info, msg):
             email_sent = student.email
         else:
Index: /main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py	(revision 8852)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py	(revision 8853)
@@ -192,5 +192,5 @@
 
 
-    def sendCredentials(self, user, password=None, login_url=None, msg=None):
+    def sendCredentials(self, user, password=None, url_info=None, msg=None):
         """Send credentials as email.
 
@@ -209,5 +209,5 @@
 Your user name: ${d}
 Your password: ${e}
-Login page: ${f}
+${f}
 
 Please remember your user name and keep
@@ -230,5 +230,5 @@
             'd':user.name,
             'e':password,
-            'f':login_url})
+            'f':url_info})
 
         body = translate(text, 'waeup.kofa',
