Currently my users are being redirected to a node after trying to first access that node's comment page (comment/reply/nid) via a link in a view. This is because I've set it so you have to be logged in to leave a comment. In the message area, on the node that they are redirected to, is an error message, "Error message: You are not authorized to post comments."
I want to change this so that when an anonymous user accesses the comment/reply/nid she is presented with a login page and then directed back to the comment/reply/nid.
I've tried logintoboggin, but that doesn't seem to work. This is possibly because an access denied message is being displayed, not a 403.
I have a view that displays links to comment on various nodes, and I tried altering the links in this view via
hook_views_pre_render. I was going to try and add a modal window containing a login form if the user was anonymous by taking a more html and js approach a la Twitter Bootstrap. But I was unable to locate the link in the massive view array. I was hoping for a render array to modify (add a class, add an attribute, etc). Not even sure if this would be a "Drupal kosher" approach.