auth/authenticate: Replaced dummy code (which always auths) with a call to the DB. Now correctly authenticates. IMPORTANT: Changed interface. Instead of returning True/False, now returns None or a dictionary of the login details. I have chased this up with all the callers (just 1). dispatch/login.py: Reworked call to authenticate. Now handles the change above, and retrieves the login details. Writes all of the user's login fields to the browser session (see debuginfo to see the fields stored there).