In the users table you need to store the logged in date.
When they login, return the logged in date and store it in a session variable, then update the users table with the currant date, so it will be used the next time they login.
you can then use the date in the session variable to query the material database to return records if the date is after the one in the session variable. If any records are returned, you can display your image.