Refactoring require_login helper method, now shared across all controllers