I set my mac to not sleep. I have to do that due to my constant video converting. Perhaps you should do the same.
Logging on for me is automatic. Perhaps yours is also set the same way. Under OSX System Prefs ->Security You will see options for Disable automatic login, if that's what you'd prefer.
Another point about the computer sleeping, you can set it to do it automatically in certain ways. Check the Energy Saver options & schedule as this might be a part of your problem.