added login control