Login flow

Cleaned the login flow (mostly slideBox), and made logout functional.