fixed bug in login system