moved login methods here; new method checkPermission() (moved from class.admin.php); user options extendable now; new method is_root() to check if current user_id == 1