diff --git a/plugins/unl_theme/views/default/page_elements/unl_nav.php b/plugins/unl_theme/views/default/page_elements/unl_nav.php
index dbce7cc14f42a77f8a935d5160e41c7b09a0efbc..0b8a54452f6469a1aa91cfb5ce1a3c42fb0dad69 100644
--- a/plugins/unl_theme/views/default/page_elements/unl_nav.php
+++ b/plugins/unl_theme/views/default/page_elements/unl_nav.php
@@ -12,13 +12,27 @@
 			return ' class="selected"';
 		}
 	}
+	
+	function inURL($needle)
+	{
+		if (stristr($_SERVER['REQUEST_URI'], $needle)) {
+			return true;
+		} else {
+			return false;
+		}
+	}
 ?>
+<?php
+
 
+?>
 <?php
     if (!isloggedin()) :
-        echo '<div id="actionBar" class="casLogin">';
-            echo elgg_view('account/forms/login');
-        echo '</div>';
+    	if (!inURL('pg/login')) :
+	        echo '<div id="actionBar" class="casLogin">';
+	            echo elgg_view('account/forms/login');
+	        echo '</div>';
+    	endif;
 	else : 
 ?>
 	<ul class="wdn_tabs disableSwitching">
@@ -83,8 +97,4 @@
 	</form>
 	</div>
 <?php endif; ?>
-
-
-
-
 <div class="clear"></div>
\ No newline at end of file