added dynamic redirecting on login