Removed logging of unsuccesful logins.
Added security functions.