Adding requires_login to total_on_week_by_month function and also adding some comments