Index: waeup/branches/ulif-layout/src/waeup/browser/pages.py
===================================================================
--- waeup/branches/ulif-layout/src/waeup/browser/pages.py	(revision 4607)
+++ waeup/branches/ulif-layout/src/waeup/browser/pages.py	(revision 4608)
@@ -19,13 +19,15 @@
 
     def update(self, SUBMIT=None, camefrom=None):
-        self.camefrom = camefrom #self.request.form.get('camefrom', '')
+        self.camefrom = camefrom
         if SUBMIT is not None:
-            self.flash('You logged in.')
-            if not self.camefrom:
-                # User might have entered the URL directly. Let's beam
-                # him back to our context.
-                self.redirect(self.url(self.context))
-                return
-            self.redirect(self.camefrom)
+            if self.request.principal.id != 'zope.anybody':
+                self.flash('You logged in.')
+                if not self.camefrom:
+                    # User might have entered the URL directly. Let's beam
+                    # him back to our context.
+                    self.redirect(self.url(self.context))
+                    return
+                self.redirect(self.camefrom)
+            self.flash('You entered wrong credentials!')
 
 
