fixed bug that is redirecting when already on login page