add session support and basic login logout logic