Added some logging functionality. Used to log failed login attempts.