Fixing double redirect when using smart login