Fix distorted login on 2.7+ (#4)