You just showed me some really nice idea for my community.
However, it is not exactly what i need.
I was able to go back to the login page when i click on the link you gave, though it showed “Great! You have successfully login.”
In my case, after logging in, if you click on the homepage(which is the login page) link or logo, it will take you to your profile since you are logged in already.