Add login/logout functionality with server-side sessions.