Basic login logout refined