Return the user if successful, None otherwise

def login(username, password, development_mode=False):
        """Return the user if successful, None otherwise"""
        retval = None
        try:
            user = User.fetch_by(username=username)
            if user and (development_mode or user.verify_password(password)):
                retval = user
        except OperationalError:
            pass
        return retval