fixed some login bugs and update uid