add userinfo function for tempaltes and change logic to fit changes
mixin user info to note item
modified text of templates
add logout logic and fix bug of login logic