fixed redirect issue on unauthenticated login