Minor performance improvement for signin javascript