Added loggin functions on client side, still work in progress