added motd function and template file
added motd function and template file