made contrib.auth.decorators work for both CBV and FBV

fix to make loginrequired work