Modified login checking by Leo