add user authentication
clean it up a bit
enable cache
instantiate session always
set loggedin false by default
clean up templates