bug fixing for loginViewController