added full implementation of log in module