'Verifies that the given username and password was correct
:param request: Either the query part of a URL a urlencoded
body of a HTTP message or a parse such.
:param kwargs: Catch whatever else is sent.
:return: redirect back to where ever the base applications
wants the user after authentication.'

def verify(self, request, **kwargs):

    if isinstance(request, basestring):
        _dict = parse_qs(request)
    elif isinstance(request, dict):
        _dict = request
    else:
        raise ValueError('Wrong    type    of    input')
    try:
        self._verify(_dict['password'][0], _dict['login'][0])
        timestamp = str(int(time.mktime(time.gmtime())))
        info = self.aes.encrypt('::'.join([_dict['login'][0], timestamp]))
        self.active[info] = timestamp
        cookie = make_cookie(self.cookie_name, info, self.srv.seed)
        return_to = create_return_url(self.return_to, _dict['query'][0], **{self.query_param: 'true'})
        resp = Redirect(return_to, headers=[cookie])
    except (AssertionError, KeyError):
        resp = Unauthorized('Unknown    user    or    wrong    password')
    return resp
