Update to site.class.php

Updates and fixes so the class works alot better. Now it can fetch
last_action by username OR id.