Fixed login. Adde preserve on refresh for UI.