facebook login, fix some bugs in login