Corrected redirect if no previous page found in login.