edited views.py to include @login_required