Easier way of using templates
Added login functionality, and some other things..