If you have Vixie `cron` installed, you can add a @reboot entry in your `crontab` file:
Instead of the first five fields, one of eight special strings may
appear:
string meaning
------ -------
@reboot Run once, at startup.
There you can take some action (i.e. writing some unique file) that you can check for during logging in (and remove that unique file) and execute your functionality once, after each reboot. On the second login (without a reboot) that unique file will not be available.