Mjulian/login after merge upstream

Fixes a login problem after merging upstream master.

Fixes login after sogo uid change has been rolled back.

Added carddav logon operation bypass (login is already done against imap and caldav). Thus users with "username" and "not-username@domain.lan" configuration can login and use properly calendaring and mailing. Some deeper research will be needed here if we want to fix that limitation.

Please @bencer and @sixstone-qq review these changes.
Why don't you move this operation before ZLog::Write and then returns 1. By the way, is it really required to set this as NULL?