Refactor to include auth checks in views