primitive and buggy login system