Login and log files

some fun stuff for your gaming pleasure: login now has error handling
without crashing and log files are now written to correctly. That being
said there is still no way to read them.