Fixed redirect problem on login