Modified login/confirmation code