logging and bug fixes

set ip address for the server correctly
correct the status handling