login state and controller