Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 18073)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py	(revision 18074)
@@ -374,9 +374,17 @@
         self.password_default = password
         if SUBMIT is not None:
-            if not self.captcha_result.is_valid:
-                # Captcha will display error messages automatically.
-                # No need to flash something.
-                return
-            if self.request.principal.id != 'zope.anybody':
+            if self.request.principal.id == 'zope.anybody':
+                if not self.captcha_result.is_valid:
+                    # Captcha will display error messages automatically.
+                    # No need to flash something.
+                    return
+            else:
+                if not self.captcha_result.is_valid:
+                    # Captcha will display error messages automatically.
+                    # No need to flash something.
+                    auth = getUtility(IAuthentication)
+                    ILogout(auth).logout(self.request)
+                    self.redirect(self.application_url() + '/login')
+                    return
                 #self.flash(_('You logged in.'))
                 if self.request.principal.user_type == 'student':
