fix to profile_settings
diff --git a/erpnext/home/page/profile_settings/profile_settings.html b/erpnext/home/page/profile_settings/profile_settings.html
index e69de29..49b1990 100644
--- a/erpnext/home/page/profile_settings/profile_settings.html
+++ b/erpnext/home/page/profile_settings/profile_settings.html
@@ -0,0 +1,5 @@
+<div class="layout-wrapper layout-wrapper-appframe">
+	<div class="layout-appframe"></div>
+	<div class="layout-main">
+	</div>
+</div>
\ No newline at end of file
diff --git a/erpnext/home/page/profile_settings/profile_settings.js b/erpnext/home/page/profile_settings/profile_settings.js
index f1ee6ff..667265e 100644
--- a/erpnext/home/page/profile_settings/profile_settings.js
+++ b/erpnext/home/page/profile_settings/profile_settings.js
@@ -16,7 +16,6 @@
 
 pscript['onload_profile-settings'] = function() {
 	var wrapper = wn.pages['profile-settings'];
-	wrapper.className = 'layout_wrapper';
 	pscript.myprofile = new MyProfile(wrapper)
 }
 
@@ -25,11 +24,11 @@
 	var me = this;
 	
 	this.make = function() {
-		this.head = new PageHeader(this.wrapper, 'My Profile Settings');
-		this.head.add_button('Change Password', this.change_password);
-		this.head.add_button('Change Background', this.change_background);
+		this.wrapper.appframe = new wn.ui.AppFrame($(this.wrapper).find('.layout-appframe'), 'Profile Settings');
+		this.wrapper.appframe.add_button('Change Password', this.change_password);
+		this.wrapper.appframe.add_button('Change Background', this.change_background);
 		
-		this.tab = make_table($a(this.wrapper, 'div', '', {marginTop:'19px'}), 
+		this.tab = make_table($a($(this.wrapper).find('.layout-main').get(0), 'div', '', {marginTop:'19px'}), 
 			1, 2, '90%', ['50%', '50%'], {padding:'11px'})
 		this.img = $a($td(this.tab, 0, 0), 'img', '', {width: '120px', maxHeight:'200px'});
 		this.img.src = wn.user_info(user).image;
diff --git a/erpnext/home/page/profile_settings/profile_settings.py b/erpnext/home/page/profile_settings/profile_settings.py
index dc82812..631d22a 100644
--- a/erpnext/home/page/profile_settings/profile_settings.py
+++ b/erpnext/home/page/profile_settings/profile_settings.py
@@ -18,11 +18,19 @@
 
 from webnotes.utils import load_json, cint, nowdate
 
+
+def check_demo():
+	demo_user = 'demo@webnotestech.com'
+	if webnotes.session['user']==demo_user:
+		webnotes.msgprint("Can't change in demo", raise_exception=1)
+	
+
 @webnotes.whitelist()
 def change_password(arg):
 	"""
 		Change password
 	"""
+	check_demo()
 	arg = load_json(arg)
 	
 	if not webnotes.conn.sql('select name from tabProfile where name=%s and password=password(%s)', (webnotes.session['user'], arg['old_password'])):
@@ -44,6 +52,7 @@
 	"""
 		updates user details given in argument
 	"""
+	check_demo()
 	from webnotes.model.doc import Document
 	
 	p = Document('Profile', webnotes.user.name)
@@ -59,6 +68,7 @@
 	"""
 		Set uploaded image as user image
 	"""
+	check_demo()
 	from webnotes.utils.file_manager import add_file_list, remove_file
 	user = webnotes.session['user']
 	
@@ -76,6 +86,7 @@
 	"""
 		Set uploaded image as user image
 	"""
+	check_demo()
 	from webnotes.utils.file_manager import add_file_list, remove_file
 	user = webnotes.session['user']
 	
diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js
index 9ca3adc..785b8ad 100644
--- a/erpnext/startup/startup.js
+++ b/erpnext/startup/startup.js
@@ -85,8 +85,8 @@
 
 		// border to the body
 		// ------------------
-		//$('footer').html('<div class="web-footer erpnext-footer">\
-		//	<a href="#!attributions">ERPNext | Attributions and License</a></div>');
+		$('footer').html('<div class="web-footer erpnext-footer">\
+			<a href="#!attributions">ERPNext | Attributions and License</a></div>');
 
 		// complete registration
 		if(in_list(user_roles,'System Manager') && (wn.boot.setup_complete=='No')) { 
diff --git a/js/all-app.js b/js/all-app.js
index 44275e2..870a3da 100644
--- a/js/all-app.js
+++ b/js/all-app.js
@@ -982,10 +982,11 @@
 /*
  *	lib/js/wn/ui/appframe.js
  */
-wn.ui.AppFrame=Class.extend({init:function(parent){this.buttons={};this.$w=$('<div></div>').appendTo(parent);this.$titlebar=$('<div class="appframe-titlebar">\
+wn.ui.AppFrame=Class.extend({init:function(parent,title){this.buttons={};this.$w=$('<div></div>').appendTo(parent);this.$titlebar=$('<div class="appframe-titlebar">\
    <span class="appframe-title"></span>\
    <span class="close">&times;</span>\
-  </div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})},title:function(txt){this.$titlebar.find('.appframe-title').html(txt);},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
+  </div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})
+if(title)this.title(title);},title:function(txt){this.$titlebar.find('.appframe-title').html(txt);},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
 this.$w.append('<div class="appframe-toolbar"></div>');args={label:label,icon:''};if(icon){args.icon='<i class="'+icon+'"></i>';}
 this.buttons[label]=$(repl('<button class="btn btn-small">\
    %(icon)s %(label)s</button>',args)).click(click).appendTo(this.$w.find('.appframe-toolbar'));return this.buttons[label];},clear_buttons:function(){this.$w.find('.appframe-toolbar').empty();}});wn.ui.make_app_page=function(opts){if(opts.single_column){$(opts.parent).html('<div class="layout-wrapper layout-wrapper-appframe">\
@@ -2230,7 +2231,8 @@
 if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}
 if(wn.boot.startup_code){eval(wn.boot.startup_code);}}else{wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity','Messages'])
 if(user_roles.indexOf('Accounts Manager')!=-1){wn.boot.profile.allow_modules.push('Dashboard');}
-erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup.show();}
+erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('<div class="web-footer erpnext-footer">\
+   <a href="#!attributions">ERPNext | Attributions and License</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup.show();}
 if(wn.boot.expires_on&&in_list(user_roles,'System Manager')){var today=dateutil.str_to_obj(dateutil.get_today());var expires_on=dateutil.str_to_obj(wn.boot.expires_on);var diff=dateutil.get_diff(expires_on,today);if(0<=diff&&diff<=15){var expiry_string=diff==0?"today":repl("in %(diff)s day(s)",{diff:diff});$('header').append(repl('<div class="expiry-info"> \
      Your ERPNext subscription will <b>expire %(expiry_string)s</b>. \
      Please renew your subscription to continue using ERPNext \
diff --git a/js/all-web.js b/js/all-web.js
index 2071afb..14975f9 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -642,10 +642,11 @@
 /*
  *	lib/js/wn/ui/appframe.js
  */
-wn.ui.AppFrame=Class.extend({init:function(parent){this.buttons={};this.$w=$('<div></div>').appendTo(parent);this.$titlebar=$('<div class="appframe-titlebar">\
+wn.ui.AppFrame=Class.extend({init:function(parent,title){this.buttons={};this.$w=$('<div></div>').appendTo(parent);this.$titlebar=$('<div class="appframe-titlebar">\
    <span class="appframe-title"></span>\
    <span class="close">&times;</span>\
-  </div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})},title:function(txt){this.$titlebar.find('.appframe-title').html(txt);},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
+  </div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})
+if(title)this.title(title);},title:function(txt){this.$titlebar.find('.appframe-title').html(txt);},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
 this.$w.append('<div class="appframe-toolbar"></div>');args={label:label,icon:''};if(icon){args.icon='<i class="'+icon+'"></i>';}
 this.buttons[label]=$(repl('<button class="btn btn-small">\
    %(icon)s %(label)s</button>',args)).click(click).appendTo(this.$w.find('.appframe-toolbar'));return this.buttons[label];},clear_buttons:function(){this.$w.find('.appframe-toolbar').empty();}});wn.ui.make_app_page=function(opts){if(opts.single_column){$(opts.parent).html('<div class="layout-wrapper layout-wrapper-appframe">\
@@ -841,7 +842,8 @@
 if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}
 if(wn.boot.startup_code){eval(wn.boot.startup_code);}}else{wn.boot.profile.allow_modules=wn.boot.profile.allow_modules.concat(['To Do','Knowledge Base','Calendar','Activity','Messages'])
 if(user_roles.indexOf('Accounts Manager')!=-1){wn.boot.profile.allow_modules.push('Dashboard');}
-erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup.show();}
+erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('<div class="web-footer erpnext-footer">\
+   <a href="#!attributions">ERPNext | Attributions and License</a></div>');if(in_list(user_roles,'System Manager')&&(wn.boot.setup_complete=='No')){wn.require("erpnext/startup/js/complete_setup.js");erpnext.complete_setup.show();}
 if(wn.boot.expires_on&&in_list(user_roles,'System Manager')){var today=dateutil.str_to_obj(dateutil.get_today());var expires_on=dateutil.str_to_obj(wn.boot.expires_on);var diff=dateutil.get_diff(expires_on,today);if(0<=diff&&diff<=15){var expiry_string=diff==0?"today":repl("in %(diff)s day(s)",{diff:diff});$('header').append(repl('<div class="expiry-info"> \
      Your ERPNext subscription will <b>expire %(expiry_string)s</b>. \
      Please renew your subscription to continue using ERPNext \