completed fix of login system