Template, login update

Partially finished login functions.
Update all templates with session_start()
Security update for backend include files.
Frontend security update will be in next commit