fix login control issue