fix a crash rotating screen while loggin in.