add spec for templates and refactor it
add spec for app signout