I have an ajax voting button: If a user clicks on a \"thumbs up\" image, but is not logged in, then they should see a dialog box that asks them to login first.
use a cookie. Get the window.location.href that they are trying to go to and store it as a cookie. On your home page, check for the presence of this cookier in the document ready function, redirect if its there