fixed login bugs added logout