working up login, logout, lock