added login control.