Fix incorrect index type
Set login time the very first time the user logs in.
Don't assume there are search criteria