Refactorings. Refactor nav/flash/contentslot to layout file. Refactor login system to remember previous tokens.