changes to login lib and log lib

@logging lib: function added to save log to db
@login library: static var added to limit max wrong login attempts
and function added to increase count of login failure in session