[[!Login? &tplType=`modChunk` &loginTpl=`myloginTpl` &loginResourceId=`22` &logoutResourceId=`23`]]
This question has been answered by robh76. See the first response.
Does it log the user in after redirecting back to the homepage? Anything in your error log?