I added security for the admin page, now only admin can view the admin page, I added a function to admin.js and one line to admin.html.erb in the document ready function, which I marked with comments.
Merged with master