def login(self, username='', password=''):
        LOGGER.error('username=%s', username)
        username = username.strip()
        password = password.strip()
        user = Backend('user').find_by_username(username)
        if user and user.check(password):
            set_secure_cookie('auth', str(user.uid))
            LOGGER.info('success')
            raise exc.HTTPFound(location='/task')
        return render_template('login.html')