Added session control. Login, logout and save works well.