Fixing some quirks related to logging on.