fixed bug when redirect to login page