Refactored authentication/login service with persistent data