Login now works with keyvalues. Todo - read main().