Fixed some issue for Sign-in function