fixed redirect bug if cookies are disabled