--- loginmenu.module	2006-11-19 12:30:05.000000000 -0800
+++ loginmenu.module	2008-08-11 01:16:47.000000000 -0700
@@ -20,17 +20,19 @@
 * Returns a menu hook with access set to NOT(userid)
 * Since anonymous has uid 0, this will be true for anon
 */
-function loginmenu_menu($may_cache) {
+function loginmenu_menu($may_cache) { 
   global $user;
+  $destination = drupal_get_destination();
+
   $items = array();
   if($may_cache){
     $items[] = array(
-      'path'      =>  'login',
+      'path'      =>  'login?' . $destination,
       'title'    =>  t('Log in'),
       'description' => t('Log in'),
       'access'    =>  !($user->uid),
       'callback'  =>  'drupal_goto',
-      'callback arguments' => array('user'),
+      'callback arguments' => array('user', $destination),
       'type' => MENU_DYNAMIC_ITEM | MENU_NORMAL_ITEM,
       'weight' => 10,
     ); 
