Handle undefined datetime values

Closes #3288
- Check for undefined last_login and created_at values that occur
  on a User model for an invited user.
Merge pull request #3298 from jaswilli/issue-3288

Handle undefined datetime values