Identified and fixed authorization checking bug in views.py