login works but redirect doesn't