diff --git a/crates/app/src/public/html/auth/connection.lisp b/crates/app/src/public/html/auth/connection.lisp
index 905b215..8c4fcef 100644
--- a/crates/app/src/public/html/auth/connection.lisp
+++ b/crates/app/src/public/html/auth/connection.lisp
@@ -12,6 +12,7 @@
(text "{% if connection_type == \"Spotify\" and user and user.connections.Spotify and config.connections.spotify_client_id %}")
(script
+ ("defer" "true")
(text "setTimeout(async () => {
const code = new URLSearchParams(window.location.search).get(\"code\");
const client_id = \"{{ config.connections.spotify_client_id }}\";
@@ -46,10 +47,11 @@
setTimeout(() => {
window.location.href = \"/settings#/connections\";
}, 500);
- }, 150);"))
+ }, 1000);"))
(text "{% elif connection_type == \"LastFm\" and user and user.connections.LastFm and config.connections.last_fm_key %}")
(script
+ ("defer" "true")
(text "setTimeout(async () => {
const token = new URLSearchParams(window.location.search).get(\"token\");
const api_key = \"{{ config.connections.last_fm_key }}\";
diff --git a/crates/app/src/public/html/profile/base.lisp b/crates/app/src/public/html/profile/base.lisp
index 5e846ff..7718eea 100644
--- a/crates/app/src/public/html/profile/base.lisp
+++ b/crates/app/src/public/html/profile/base.lisp
@@ -132,9 +132,11 @@
(text "{{ profile.settings.biography|markdown|safe }}"))
(div
("class" "card flex flex-col gap-2")
+ (text "{% if user -%}")
(div
("style" "display: contents;")
(text "{% if profile.connections.Spotify and profile.connections.Spotify[0].data.name -%} {{ components::spotify_playing(state=profile.connections.Spotify[1]) }} {% elif profile.connections.LastFm and profile.connections.LastFm[0].data.name %} {{ components::last_fm_playing(state=profile.connections.LastFm[1]) }} {%- endif %}"))
+ (text "{%- endif %}")
(div
("class" "w-full flex justify-between items-center")
(span