diff --git a/client/boot/common.js b/client/boot/common.js index 6966833534b4e2..b3ce6e3b95e6d0 100644 --- a/client/boot/common.js +++ b/client/boot/common.js @@ -108,6 +108,10 @@ const loggedOutMiddleware = currentUser => { page( '*', ( context, next ) => { if ( isValidSection( context.path ) ) { + // redirect to login page if we're not on it already + if ( ! startsWith( context.path, '/log-in' ) ) { + return page.redirect( '/log-in/?redirect_to=' + encodeURIComponent( context.path ) ); + } next(); } } ); diff --git a/client/wordpress-com.js b/client/wordpress-com.js index 7038dc72970719..3946e945e57ede 100644 --- a/client/wordpress-com.js +++ b/client/wordpress-com.js @@ -188,6 +188,7 @@ const sections = [ module: 'my-sites/stats', secondary: true, group: 'sites', + enableLoggedOut: true, }, { name: 'checklist',