I have modified configuration files config.php to have HTTPS working:
// HTTP define
but I cannot login into my website any longer (with valid username and password.
You need to ensure that
See this article How to configure SSL for OpenCart v.2 for more information