Fix bug in login module.