Login and register redirect fixes