fixed a bug, if you are logged in, it will redirect to user home correctly