On a recent project, I assisted in creating a user portal for customers. By default, Sitefinity will actually take users to the Sitefinity backend login to authenticate. This is a quick code snippet that allows you to redirect users when attempting to access an unauthenticated URL.