COR-285: Applied the same logic for the DefaultLoginModule