Add ability to mark a page as requiring a login.

Tests for login_required.