Added login_required decorator to view