diff --git a/routes/_components/NotLoggedInHome.html b/routes/_components/NotLoggedInHome.html
new file mode 100644
index 0000000..3795e55
--- /dev/null
+++ b/routes/_components/NotLoggedInHome.html
@@ -0,0 +1,33 @@
+
+Pinafore is a web client for Mastodon, optimized for speed and simplicity.
+
+To get started, log in to an instance.
+
+Don't have an instance? Join Mastodon!
+
\ No newline at end of file
diff --git a/routes/_components/Timeline.html b/routes/_components/Timeline.html
new file mode 100644
index 0000000..10fb833
--- /dev/null
+++ b/routes/_components/Timeline.html
@@ -0,0 +1,29 @@
+
+ {{#each statuses as status}}
+ {{JSON.stringify(status, null, ' ')}}
+ {{/each}}
+
+
\ No newline at end of file
diff --git a/routes/_utils/store.js b/routes/_utils/store.js
index 7381a5d..47f1193 100644
--- a/routes/_utils/store.js
+++ b/routes/_utils/store.js
@@ -24,8 +24,14 @@ const store = new LocalStorageStore({
instanceNameInSearch: ''
})
-if (process.browser) {
- window.store = store
+store.compute(
+ 'isUserLoggedIn',
+ ['currentOauthInstance'],
+ currentOauthInstance => !!currentOauthInstance && currentOauthInstance.access_token
+)
+
+if (process.browser && process.env.NODE_ENV !== 'production') {
+ window.store = store // for debugging
}
export { store }
\ No newline at end of file
diff --git a/routes/index.html b/routes/index.html
index 7367ebb..831159b 100644
--- a/routes/index.html
+++ b/routes/index.html
@@ -1,66 +1,30 @@
<:Head>
- Home
+ Pinafore
-
- Pinafore is a web client for Mastodon, optimized for speed and simplicity.
-
- To get started, log in to an instance.
-
- Don't have an instance? Join Mastodon!
+ {{#if $isUserLoggedIn}}
+
+ {{else}}
+
+ {{/if}}
+
\ No newline at end of file
diff --git a/routes/settings/add-instance.html b/routes/settings/add-instance.html
index 2f42cdc..ede3a8e 100644
--- a/routes/settings/add-instance.html
+++ b/routes/settings/add-instance.html
@@ -8,7 +8,7 @@
Log in to your instance to use Pinafore.
-