Corrected faulty redirect behavior on login