but it is getting stuck in a redirect loop...