Use WSGI environment parameter, not os.environ.

The WSGI protocol does not set actual environment variables, but
instead passes them as an environ parameter. This should be used to
check for cookies.
GDU update (forgot to push this)