Added accounts function and put the header in a template