Ok, this would work.
However I have a question. If I show a login link to the login page, is there a way of directing them back to the cart page after login. Like the way it works if you restrict access to a page.
Otherwise, after logging in the user would go to their control panel, which could confuse some people.