fixed redirect login bug