def process_request(self, request):
token = request.GET.get(TOKEN_NAME)<EOL>user = None if token is None else authenticate(url_auth_token=token)<EOL>if hasattr(request, '<STR_LIT>') and user is not None:<EOL><INDENT>login(request, user)<EOL>if (<EOL>hasattr(request, '<STR_LIT:user>') and<EOL>request.method == '<STR_LIT:GET>' and<EOL>not self.is_safari(request)<EOL>):<EOL><INDENT>return self.get_redirect(request)<EOL><DEDENT><DEDENT>if not hasattr(request, '<STR_LIT:user>'):<EOL><INDENT>request.user = user if user is not None else AnonymousUser()<EOL><DEDENT>
Log user in if `request` contains a valid login token.

Return a HTTP redirect response that removes the token from the URL
after a successful login when sessions are enabled, else ``None``.