Detect login status on load