home page fixes
diff --git a/erpnext/home/page/desktop/desktop.js b/erpnext/home/page/desktop/desktop.js
index ebd3da1..63a075c 100644
--- a/erpnext/home/page/desktop/desktop.js
+++ b/erpnext/home/page/desktop/desktop.js
@@ -43,61 +43,50 @@
 }
 
 erpnext.desktop.render = function() {
-	var icons = [
-		{ gradient: 'blue', sprite: 'account', label: 'Accounts', link: '#!accounts-home',
-			is_module: 'Accounts'},
-		{ gradient: 'green', sprite: 'selling', label: 'Selling', link: '#!selling-home',
-			is_module: 'Selling'},
-		{ gradient: 'yellow', sprite: 'stock', label: 'Stock', link: '#!stock-home',
-			is_module: 'Stock'},
-		{ gradient: 'red', sprite: 'buying', label: 'Buying', link: '#!buying-home',
-			is_module: 'Buying'},
-		{ gradient: 'purple', sprite: 'support', label: 'Support', link: '#!support-home',	
-			is_module: 'Support'},
-		{ gradient: 'ocean', sprite: 'hr', label: 'Human<br />Resources', link: '#!hr-home',
-			is_module: 'HR'},
-		{ gradient: 'violet', sprite: 'project', label: 'Projects', link: '#!projects-home',
-			is_module: 'Projects'},
-		{ gradient: 'dark-red', sprite: 'production', label: 'Production', link: '#!production-home',
-			is_module: 'Production'},
-		{ gradient: 'leaf-green', sprite: 'website', label: 'Website', link: '#!website-home',
-			is_module: 'Website'},
-	]
+	var icons = {
+		'Accounts': { gradient: 'blue', sprite: 'account', label: 'Accounts'},
+		'Selling': { gradient: 'green', sprite: 'selling', label: 'Selling'},
+		'Stock': { gradient: 'yellow', sprite: 'stock', label: 'Stock'},
+		'Buying': { gradient: 'red', sprite: 'buying', label: 'Buying'},
+		'Support': { gradient: 'purple', sprite: 'support', label: 'Support'},
+		'HR': { gradient: 'ocean', sprite: 'hr', label: 'Human<br />Resources'},
+		'Projects':	{ gradient: 'violet', sprite: 'project', label: 'Projects'},
+		'Production': { gradient: 'dark-red', sprite: 'production', label: 'Production'},
+		'Website': { gradient: 'leaf-green', sprite: 'website', label: 'Website'},
+		'Activity': { gradient: 'brown', sprite: 'feed', label: 'Activity'},
+		'Setup': { gradient: 'grey', sprite: 'setting', label: 'Setup'},
+		'Dashboard': { gradient: 'bright-green', sprite: 'dashboard', label: 'Dashboard'},
+		'To Do': { gradient: 'bright-yellow', sprite: 'todo', label: 'To Do'},
+		'Messages': { gradient: 'pink', sprite: 'messages', label: 'Messages'},
+		'Calendar': { gradient: 'peacock', sprite: 'calendar', label: 'Calendar'},
+		'Knowledge Base': { gradient: 'ultra-dark-green', sprite: 'kb', label: 'Knowledge<br />Base'}
+	}
+	
 
-	var add_icon = function(v) {
+	var add_icon = function(m) {
+		var icon = icons[m];
+		icon.link = erpnext.modules[m];
 		$('#icon-grid').append(repl('\
-			<div id="%(sprite)s" class="case-wrapper"><a href="%(link)s">\
+			<div id="%(sprite)s" class="case-wrapper"><a href="#!%(link)s">\
 				<div class="case-border case-%(gradient)s">\
 					<div class="sprite-image sprite-%(sprite)s"></div>\
 				</div></a>\
 				<div class="case-label">%(label)s</div>\
-			</div>', v));		
+			</div>', icon));		
 	}
 	
-	var get_module = function(m) {
-		for(var i in icons) {
-			if(icons[i].is_module==m) return icons[i]
-		}
-	}
-	
-	// activity
-	add_icon({ gradient: 'brown', sprite: 'feed', label: 'Activity', link: '#!Event Updates'});
-
-	// modules
-	for(var i in wn.boot.modules_list)
-		add_icon(get_module(wn.boot.modules_list[i]));
-
 	// setup
+
+	for(var i in wn.boot.modules_list) {
+		var m = wn.boot.modules_list[i];
+		if(m!='Setup');
+			add_icon(m);
+	}
+
 	if(user_roles.indexOf('System Manager')!=-1)
-		add_icon({ gradient: 'grey', sprite: 'setting', label: 'Setup', link: '#!Setup' });
+		add_icon('Setup')
 
 	// apps
-	add_icon({ gradient: 'bright-green', sprite: 'dashboard', label: 'Dashboard', link: '#!dashboard' });
-	add_icon({ gradient: 'bright-yellow', sprite: 'todo', label: 'To Do', link: '#!todo' });
-	add_icon({ gradient: 'pink', sprite: 'messages', label: 'Messages', link: '#!messages' });
-	add_icon({ gradient: 'peacock', sprite: 'calendar', label: 'Calendar', link: '#!calendar' });
-	add_icon({ gradient: 'ultra-dark-green', sprite: 'kb', label: 'Knowledge<br />Base', link: '#!questions' });
-	
 	erpnext.desktop.show_pending_notifications();
 
 }
diff --git a/erpnext/setup/page/modules_setup/modules_setup.js b/erpnext/setup/page/modules_setup/modules_setup.js
index fe7f14f..af7522f 100644
--- a/erpnext/setup/page/modules_setup/modules_setup.js
+++ b/erpnext/setup/page/modules_setup/modules_setup.js
@@ -1,8 +1,8 @@
 wn.require('lib/js/lib/jquery-ui-sortable.min.js');
 
 $.extend(wn.pages.modules_setup, {
-	modules: ['Accounts', 'Selling', 'Buying', 'Stock', 'Production', 'Projects', 
-		'Support', 'HR', 'Website'],	
+	modules: ['Activity', 'Accounts', 'Selling', 'Buying', 'Stock', 'Production', 'Projects', 
+		'Support', 'HR', 'Website', 'To Do', 'Messages', 'Calendar', 'Knowledge Base'],	
 	onload: function(wrapper) {
 		wn.pages.modules_setup.refresh(wn.boot.modules_list);
 	},
diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js
index 83b1685..30ab28d 100644
--- a/erpnext/startup/startup.js
+++ b/erpnext/startup/startup.js
@@ -19,6 +19,24 @@
 
 wn.provide('erpnext.startup');
 
+erpnext.modules = {
+	'Selling': 'selling-home',
+	'Accounts': 'accounts-home',
+	'Stock': 'stock-home',
+	'Buying': 'buying-home',
+	'Support': 'support-home',
+	'Projects': 'projects-home',
+	'Production': 'production-home',
+	'Website': 'website-home',
+	'HR': 'hr-home',
+	'Setup': 'Setup',
+	'Activity': 'Event Updates',
+	'To Do': 'todo',
+	'Calendar': 'calendar',
+	'Messages': 'messages',
+	'Knowledge Base': 'questions'
+}
+
 erpnext.startup.set_globals = function() {
 	pscript.is_erpnext_saas = cint(wn.control_panel.sync_with_gateway)
 	if(inList(user_roles,'System Manager')) is_system_manager = 1;
diff --git a/erpnext/startup/toolbar.js b/erpnext/startup/toolbar.js
index 8c8d041..1a2bfdf 100644
--- a/erpnext/startup/toolbar.js
+++ b/erpnext/startup/toolbar.js
@@ -81,20 +81,22 @@
 	if(wn.boot.modules_list)
 		wn.boot.modules_list = JSON.parse(wn.boot.modules_list);
 	else
-		wn.boot.modules_list = ['Accounts', 'Selling', 'Buying', 'Stock', 
-			'Production', 'Projects', 'Support', 'HR', 'Website'];
+		wn.boot.modules_list = keys(erpnext.modules).sort();
 
 	// add to dropdown
 	for(var i in wn.boot.modules_list) {
 		var m = wn.boot.modules_list[i]
-		args = {
-			module: m,
-			module_page: m.toLowerCase(),
-			module_label: m=='HR' ? 'Human Resources' : m
+		
+		if(m!='Setup') {
+			args = {
+				module: m,
+				module_page: erpnext.modules[m],
+				module_label: m=='HR' ? 'Human Resources' : m
+			}
+
+			$('.navbar .modules').append(repl('<li><a href="#!%(module_page)s" \
+				data-module="%(module)s">%(module_label)s</a></li>', args));			
 		}
-			
-		$('.navbar .modules').append(repl('<li><a href="#!%(module_page)s-home" \
-			data-module="%(module)s">%(module_label)s</a></li>', args));			
 	}
 	
 	// setup for system manager
diff --git a/index.cgi b/index.cgi
index 301f395..ed766eb 100755
--- a/index.cgi
+++ b/index.cgi
@@ -40,7 +40,7 @@
 		webnotes.http_request = webnotes.auth.HTTPRequest()
 		return True
 	except webnotes.AuthenticationError, e:
-		pass
+		return True
 	except webnotes.UnknownDomainError, e:
 		print "Location: " + (webnotes.defs.redirect_404)
 	except webnotes.SessionStopped, e:
diff --git a/js/all-app.js b/js/all-app.js
index cd563f1..62d63ce 100644
--- a/js/all-app.js
+++ b/js/all-app.js
Binary files differ
diff --git a/js/all-web.js b/js/all-web.js
index c34d582..07fae99 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -1040,7 +1040,8 @@
 /*
  *	erpnext/startup/startup.js
  */
-var current_module;var is_system_manager=0;wn.provide('erpnext.startup');erpnext.startup.set_globals=function(){pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway)
+var current_module;var is_system_manager=0;wn.provide('erpnext.startup');erpnext.modules={'Selling':'selling-home','Accounts':'accounts-home','Stock':'stock-home','Buying':'buying-home','Support':'support-home','Projects':'projects-home','Production':'production-home','Website':'website-home','HR':'hr-home','Setup':'Setup','Activity':'Event Updates','To Do':'todo','Calendar':'calendar','Messages':'messages','Knowledge Base':'questions'}
+erpnext.startup.set_globals=function(){pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway)
 if(inList(user_roles,'System Manager'))is_system_manager=1;}
 erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
 if(user=='Guest'){if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('<div class="web-footer erpnext-footer">\
diff --git a/version.num b/version.num
index e9244f9..3879e48 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-752
\ No newline at end of file
+753
\ No newline at end of file