COR-284: Applied the same logic for the DefaultLoginModule

https://jira.exoplatform.org/browse/COR-284