Move header into separate template. Add logout link.
Ensure the title tag always gets populated.
Return login token in json rather than cookie header so that it is immediately available