Fixed ip-mac map (SQL NULL handling, login, update all records)