keep logged in using cookies to store token.
Add rules and todo