Python CGI authentication system