Add a login/out thingy, add session expiry and cleanup support

Hi #5