work on automatic logout