check login before other operation