Update locallib.php

Fix flaw  in POST (now check if 'REMOTE_ADDR' and 'HTTP_USER_AGENT' is defined) - now check if it is defined
Adjust in "identation"