prevent GET requests except from localhost
handle undefined variables