diff --git a/plugins/unl_theme/start.php b/plugins/unl_theme/start.php
index 1e6fc66515eb5cea1ad33202dcfd0dc8d2e96d07..1b869e197b097114e505d61c9cd2ef96beba5d5c 100644
--- a/plugins/unl_theme/start.php
+++ b/plugins/unl_theme/start.php
@@ -2,9 +2,13 @@
 
 /* Initialize the theme */
 function unl_theme_init(){
-
-
-
+	
+	//If user is signed into UNL SSO but not planet red and they visit planet red - try logging them in
+	if ($_COOKIE['unl_sso'] && !isloggedin() && get_input('action') != 'login') {	
+		$ts = time();
+		$token = generate_action_token($ts); 
+		forward($CONFIG->url.'action/login?usecas=yes&email='.$email.'&__elgg_ts='.$ts.'&__elgg_token='.$token.'&view='.$view);	
+	}
 }
 
 // Initialise log browser