Token Based Authentication In Python