Extension:ForceLogin

The ForceLogin extension forces login on Edit action of a page and redirects user back to the edit page on login.

Installation
Copy the source into the file named extensions/ForceLogin/ForceLogin.php and add the following line to your LocalSettings.php: