loginFirst
defines a LocParam which can be used for specifying where to send the user if they are not logged in. It is used in conjunction with SiteMap.
For the page you want to protect, you can modify that entry like:
Menu("Protected Page") / "protected" >> User.loginFirst
That should test whether the user is logged in when you access /protected
and, if they are not, set the loginRedirect
SessionVar
and display the login form. On a successful login, you should be redirected to the page specified in loginRedirect
.
I believe you can also just use: override def homePage = "/myPicks"
if you want to set a default page to redirect to.