For starting out, just having fun on the bike is enough i think. When you are comfortable with the bike and such, get a heartrate monitor to pace yourself with, others here will surely chime in about how to set up your training more efficiently using it. For me, cycling is fun and that's why i do it, the weight loss/fitness is an added bonus :-)
After a 40 min ride you will need to refuel a bit, and yes it's not very good to eat late, but better than not sleeping is how i see it.
There are some pretty good threads on using a HRM here, and in the training and nutrition subforum too.