Fixing login to work with headpin