allow add buildings; catch 401 status code in ajax;
add building json api