refactored: views
edited: require_login filter