Fixes invalid login issue