Fixed some missing login checks, and fixed an edge case bug in the usage function.
Fixed some missing login checks, and fixed an edge case bug in the usage function.

This bug was caused by a key error which was only triggered when there wasn't a HTTP_REFERER present in the request.

audreyr/opencomparison,QLGu/djangopackages,QLGu/djangopackages,miketheman/opencomparison,benracine/opencomparison,cartwheelweb/packaginator,nanuxbe/djangopackages,cartwheelweb/packaginator,miketheman/opencomparison,audreyr/opencomparison,nanuxbe/djangopackages,nanuxbe/djangopackages,QLGu/djangopackages,cartwheelweb/packaginator,benracine/opencomparison,pydanny/djangopackages,pydanny/djangopackages,pydanny/djangopackages