add error.tmpl template
add session struct
finish user login operation
finish user login operation